--- xds-mystruct.c 2001/08/01 11:27:20 1.5.2.1
+++ xds-mystruct.c 2001/08/01 12:04:42 1.5.2.2
@@ -41,7 +41,6 @@
void* buffer, size_t buffer_size, size_t* used_buffer_size,
va_list* args)
{
- int rc;
struct mystruct* ms;
assert(xds != NULL);
@@ -51,18 +50,13 @@
assert(args != NULL);
ms = va_arg(*args, struct mystruct*);
- rc = xds_encode(xds, "int32 int64 uint32", ms->small, ms->big, ms->positive);
- if (rc == XDS_OK)
- return 0;
- else
- return rc;
+ return xds_encode(xds, "int32 int64 uint32", ms->small, ms->big, ms->positive);
}
static int decode_mystruct_engine(xds_t* xds, void* engine_context,
void* buffer, size_t buffer_size, size_t* used_buffer_size,
va_list* args)
{
- int rc;
struct mystruct* ms;
assert(xds != NULL);
@@ -72,11 +66,7 @@
assert(args != NULL);
ms = va_arg(*args, struct mystruct*);
- rc = xds_decode(xds, "int32 int64 uint32", &(ms->small), &(ms->big), &(ms->positive));
- if (rc == XDS_OK)
- return 0;
- else
- return rc;
+ return xds_decode(xds, "int32 int64 uint32", &(ms->small), &(ms->big), &(ms->positive));
}
int main()
|