]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Initialize these variables (compiler complains it may be used uninitialised,
authorWouter Wijngaards <wouter@NLnetLabs.nl>
Tue, 12 Dec 2006 08:09:38 +0000 (08:09 +0000)
committerWouter Wijngaards <wouter@NLnetLabs.nl>
Tue, 12 Dec 2006 08:09:38 +0000 (08:09 +0000)
and the code is complicated, so lets init at NULL to be safe).

pcat/pcat.c

index 4b95855fc5744b5edf99d68965ca408af1d36fda..c0915558cf7692f7777cff6fc1c0a2002c7368b1 100644 (file)
@@ -143,7 +143,7 @@ int
 main(int argc, char **argv) 
 {
        char errbuf[PCAP_ERRBUF_SIZE];
-       pcap_t *p;
+       pcap_t *p = NULL;
        struct pcap_pkthdr h;
        const u_char *x;
        size_t i = 0;
@@ -151,7 +151,7 @@ main(int argc, char **argv)
        char *ip_str;
        int c;
        size_t failure;
-       FILE *infile;
+       FILE *infile = NULL;
        int pcat_input_file = 0;
 
        uint8_t *result;