diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-04-22 03:07:30 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-04-22 03:07:30 -0700 |
commit | 25b35ce8dee1bed436f318e5b9a87a351655913b (patch) | |
tree | 413e9b164a9626ccbbeeeb2bd6ca168e27d02cd7 /pcap-dlpi.c | |
parent | 72ee86ce2c386508bea45df655e0894a6b47973c (diff) |
Return warning indications from the activate routine.
Initialize the status variable to "no error or warning" (0); set it for
all error or warning conditions. Return that variable if we haven't
failed.
Diffstat (limited to 'pcap-dlpi.c')
-rw-r--r-- | pcap-dlpi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pcap-dlpi.c b/pcap-dlpi.c index 8f44baf6..d40e1cfd 100644 --- a/pcap-dlpi.c +++ b/pcap-dlpi.c @@ -354,7 +354,7 @@ pcap_activate_dlpi(pcap_t *p) #ifndef HAVE_DEV_DLPI char dname2[100]; #endif - int status; + int status = 0; #ifdef HAVE_DEV_DLPI /* @@ -801,7 +801,7 @@ pcap_activate_dlpi(pcap_t *p) p->stats_op = pcap_stats_dlpi; p->cleanup_op = pcap_cleanup_dlpi; - return (0); + return (status); bad: pcap_cleanup_dlpi(p); return (status); |