]> The Tcpdump Group git mirrors - tcpdump/blobdiff - netdissect.c
Force -t on in TESTonce.
[tcpdump] / netdissect.c
index 0c7d661d3da402b8d9f0c93a8e3abc4e48151cc8..0215c83b7f23ab3483e08d357f3ae7b19c4d7b38 100644 (file)
@@ -27,8 +27,9 @@
 #endif
 
 #include <netdissect-stdinc.h>
-
 #include "netdissect.h"
+#include <string.h>
+#include <stdio.h>
 
 #ifdef USE_LIBSMI
 #include <smi.h>
@@ -48,6 +49,7 @@ nd_init(char *errbuf, size_t errbuf_size)
 #ifdef _WIN32
        WORD wVersionRequested;
        WSADATA wsaData;
+       int err;
 
        /*
         * Request Winsock 2.2; we expect Winsock 2.
@@ -73,7 +75,7 @@ nd_init(char *errbuf, size_t errbuf_size)
         * Clears the error buffer, and uses it so we don't get
         * "unused argument" warnings at compile time.
         */
-       snprintf(errbuf, errbuf_size, "");
+       strlcpy(errbuf, "", errbuf_size);
        return (0);
 }