Silly me: Reverted last change. The code here is actually okay but

when driving the one for gnupg, the bug was probably introduced.
This commit is contained in:
Werner Koch 2003-11-13 07:31:58 +00:00
parent c2740411a9
commit 23a2e04133
2 changed files with 4 additions and 8 deletions

View File

@ -1,7 +1,3 @@
2003-11-13 Werner Koch <wk@gnupg.org>
* vasprintf.c (int_vasprintf): ARGS should not be a pointer.
2003-10-31 Werner Koch <wk@gnupg.org> 2003-10-31 Werner Koch <wk@gnupg.org>
* keylist.c (parse_timestamp): Detect ISO 8601 timestamps and try * keylist.c (parse_timestamp): Detect ISO 8601 timestamps and try

View File

@ -43,13 +43,13 @@ Boston, MA 02111-1307, USA. */
int global_total_width; int global_total_width;
#endif #endif
static int int_vasprintf (char **, const char *, va_list); static int int_vasprintf (char **, const char *, va_list *);
static int static int
int_vasprintf (result, format, args) int_vasprintf (result, format, args)
char **result; char **result;
const char *format; const char *format;
va_list args; va_list *args;
{ {
const char *p = format; const char *p = format;
/* Add one to make sure that it is never zero, which might cause malloc /* Add one to make sure that it is never zero, which might cause malloc
@ -57,7 +57,7 @@ int_vasprintf (result, format, args)
int total_width = strlen (format) + 1; int total_width = strlen (format) + 1;
va_list ap; va_list ap;
va_copy (ap, args); va_copy (ap, *args);
while (*p != '\0') while (*p != '\0')
{ {
@ -130,7 +130,7 @@ int_vasprintf (result, format, args)
#endif #endif
*result = malloc (total_width); *result = malloc (total_width);
if (*result != NULL) if (*result != NULL)
return vsprintf (*result, format, args); return vsprintf (*result, format, *args);
else else
return 0; return 0;
} }