OSSP CVS Repository

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

Check-in Number: 4197
Date: 2001-Jul-09 21:20:58 (local)
2001-Jul-09 19:20:58 (UTC)
User:simons
Branch:
Comment: Swapped order of if statement to be more efficient.
Tickets:
Inspections:
Files:
ossp-pkg/xds/setbuffer.c      1.3 -> 1.4     1 inserted, 1 deleted

ossp-pkg/xds/setbuffer.c 1.3 -> 1.4

--- setbuffer.c  2001/07/09 19:19:37     1.3
+++ setbuffer.c  2001/07/09 19:20:58     1.4
@@ -36,7 +36,7 @@
     assert(flag == XDS_GIFT || flag == XDS_LOAN);
     assert((buffer != NULL && buffer_len != 0) || flag == XDS_GIFT);
     if (xds == NULL || (flag != XDS_GIFT && flag != XDS_LOAN) ||
-        ((buffer == NULL || buffer_len == 0) && flag == XDS_LOAN))
+        (flag == XDS_LOAN && (buffer == NULL || buffer_len == 0)))
         return XDS_ERR_INVALID_ARG;
 
     /* Free the old buffer if there is one. */

CVSTrac 2.0.1