2007-08-06 Simon Josefsson <simon@josefsson.org>
[gnulib.git] / lib / xvasprintf.c
index 30cea93..bd68362 100644 (file)
@@ -1,5 +1,5 @@
 /* vasprintf and asprintf with out-of-memory checking.
-   Copyright (C) 1999, 2002-2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002-2004, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,8 +23,8 @@
 #include <errno.h>
 #include <limits.h>
 #include <string.h>
+#include <stdio.h>
 
-#include "vasprintf.h"
 #include "xalloc.h"
 
 /* Checked size_t computations.  */
@@ -64,7 +64,7 @@ xstrcat (size_t argcount, va_list args)
     }
 
   /* Allocate and fill the result string.  */
-  result = (char *) xmalloc (totalsize + 1);
+  result = XNMALLOC (totalsize + 1, char);
   p = result;
   for (i = argcount; i > 0; i--)
     {