OSSP CVS Repository

ossp - Check-in [4260]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4260
Date: 2001-Aug-01 14:04:42 (local)
2001-Aug-01 12:04:42 (UTC)
User:simons
Branch:callback-semantic-rewrite
Comment: Rewrote formatting engines for the new semantics.
Tickets:
Inspections:
Files:
ossp-pkg/xds/regression-tests/xds-mystruct.c      1.5.2.1 -> 1.5.2.2     2 inserted, 12 deleted

ossp-pkg/xds/regression-tests/xds-mystruct.c 1.5.2.1 -> 1.5.2.2

--- 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()

CVSTrac 2.0.1