static void dprintf(int lev, const char* fmt, ...) {
va_list ap;
- va_start(ap,fmt);
if (lev <= debug_level) {
+ va_start(ap,fmt);
vfprintf(stderr,fmt,ap);
+ va_end(ap);
fflush(stderr);
}
- va_end(ap);
}
" -p promiscuous mode\n"
" -s snapshot length\n"
" -q quiet\n"
- " -d increase deug level\n"
+ " -d increase debug level\n"
" -h prints this message\n"
;
dprintf(1,"starting with:\n interface: %s\n snaplen: %d\n promisc: %d"
"\n outfile: %s\n capture filter: %s\n start: %s\n stop: %s\n debug level: %d\n",
- interface ? interface : "to be choosen",
+ interface ? interface : "to be chosen",
snaplen,
promisc,
outfile ? outfile : "** missing **",