]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgform.c
more sprintf removals
[citadel.git] / citadel / msgform.c
index e4f80b6665cfdfd7ac61996d4a261be516b7f630..26de208eb009c31c0e943b1d902773f000003a38 100644 (file)
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
-#include <time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
 #include <errno.h>
 
 
@@ -36,7 +47,7 @@ char *strerror(int e)
 {
        static char buf[32];
 
-       sprintf(buf,"errno = %d",e);
+       snprintf(buf, sizeof buf, "errno = %d",e);
        return(buf);
        }
 #endif