]> code.citadel.org Git - citadel.git/blobdiff - webcit/snprintf.c
* All OS-level includes are now included from webcit.h instead of from
[citadel.git] / webcit / snprintf.c
index 7c8f2b92cd4bb008465b20d0f983b1654c36d600..d98178b48b86edfb0bdbcfbb9e201fd3a0a3e602 100644 (file)
@@ -1,8 +1,9 @@
 /*
+ * $Id$
+ *
  * modified from Sten Gunterberg's BUGTRAQ post of 22 Jul 1997
  * --nathan bryant <bryant@cs.usm.maine.edu>
  *
- * $Id$
  */
 
 /*
  * Written July 1997 by Sten Gunterberg (gunterberg@ergon.ch)
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
+#include "webcit.h"
 #include "webserver.h"
 
 static int needed(const char *fmt, va_list argp)
@@ -57,7 +55,7 @@ int vsnprintf(char *buf, size_t max, const char *fmt, va_list argp)
        if ((size = vsprintf(p, fmt, argp)) >= max)
                size = -1;
 
-       safestrncpy(buf, p, max);
+       strncpy(buf, p, max);
        buf[max - 1] = 0;
        free(p);
        return size;