OSSP CVS Repository

ossp - Difference in ossp-pkg/uuid/uuid_str.c versions 1.7 and 1.8
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/uuid/uuid_str.c 1.7 -> 1.8

--- uuid_str.c   2006/03/13 09:39:11     1.7
+++ uuid_str.c   2006/03/17 07:10:10     1.8
@@ -690,13 +690,12 @@
 {
     char *rv;
     int n;
-    va_list ap_bak;
+    va_list ap_tmp;
 
-    va_copy(ap_bak, ap);
-    n = str_vsnprintf(NULL, 0, fmt, ap);
+    va_copy(ap_tmp, ap);
+    n = str_vsnprintf(NULL, 0, fmt, ap_tmp);
     if ((rv = (char *)malloc(n+1)) == NULL)
         return NULL;
-    va_copy(ap, ap_bak);
     str_vsnprintf(rv, n+1, fmt, ap);
     return rv;
 }
@@ -723,7 +722,7 @@
 {
     int rv;
     size_t n;
-    va_list ap_bak;
+    va_list ap_tmp;
 
     if (str == NULL)
         return -1;
@@ -732,12 +731,11 @@
         rv = strlen(*str);
     }
     else {
-        va_copy(ap_bak, ap);
+        va_copy(ap_tmp, ap);
         n = strlen(*str);
-        rv = str_vsnprintf(NULL, 0, fmt, ap);
+        rv = str_vsnprintf(NULL, 0, fmt, ap_tmp);
         if ((*str = (char *)realloc(*str, n+rv+1)) == NULL)
             return -1;
-        va_copy(ap, ap_bak);
         str_vsnprintf((*str)+n, rv+1, fmt, ap);
     }
     return rv;

CVSTrac 2.0.1