silence 2 more warningsi; fix a potential NULL assignment on the way

This commit is contained in:
marschap
2006-04-14 09:59:54 +00:00
parent e4812666d8
commit 08574b8baa
2 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -315,7 +315,7 @@ sock_printf_error(int fd, const char *format, .../*args*/ )
va_list ap;
int size = 0;
strcpy(buf, huh);
strncpy(buf, huh, sizeof(huh)); // note: sizeof(huh) < MAXMSG
va_start(ap, format);
size = vsnprintf(buf + (sizeof(huh)-1), sizeof(buf) - (sizeof(huh)-1), format, ap);