OSSP CVS Repository

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

Check-in Number: 1963
Date: 2002-Mar-07 12:51:54 (local)
2002-Mar-07 11:51:54 (UTC)
User:rse
Branch:
Comment: Hell, why did the compiler not complain? The ctx stuff is only allowed to be used if real output is written. Hmmmm...
Tickets:
Inspections:
Files:
ossp-pkg/sa/sa.c      1.56 -> 1.57     4 inserted, 4 deleted

ossp-pkg/sa/sa.c 1.56 -> 1.57

--- sa.c 2002/03/07 11:23:33     1.56
+++ sa.c 2002/03/07 11:51:54     1.57
@@ -384,11 +384,11 @@
         ctx.bufptr = buffer;
         ctx.buflen = bufsize;
         n = sa_mvxprintf(sa_mvsnprintf_cb, &ctx, format, ap);
+        if (n != -1 && ctx.buflen == 0)
+            n = -1;
+        if (n != -1)
+            *(ctx.bufptr) = '\0';
     }
-    if (n != -1 && ctx.buflen == 0)
-        n = -1;
-    if (n != -1)
-        *(ctx.bufptr) = '\0';
     return n;
 }
 

CVSTrac 2.0.1