From 9a85533914119fb995fb61555c9f6e0018d4d181 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Oct 2007 11:38:36 -0700 Subject: Fix the popt / bool issues. Some places we used BOOL where we meant int. Fix this. Thanks to metze for pointing this out. Jeremy. (This used to be commit 793a9d24a163cb6cf5a3a0aa5ae30e9f8cf4744a) --- source3/utils/log2pcaphex.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'source3/utils/log2pcaphex.c') diff --git a/source3/utils/log2pcaphex.c b/source3/utils/log2pcaphex.c index 6f07c4f543..20cc40ca59 100644 --- a/source3/utils/log2pcaphex.c +++ b/source3/utils/log2pcaphex.c @@ -35,8 +35,8 @@ #include -int quiet = 0; -int hexformat = 0; +bool quiet = 0; +bool hexformat = 0; #define itoa(a) ((a) < 0xa?'0'+(a):'A' + (a-0xa)) @@ -233,8 +233,8 @@ int main (int argc, char **argv) int in_packet = 0; struct poptOption long_options[] = { POPT_AUTOHELP - { "quiet", 'q', POPT_ARG_NONE, &quiet, 0, "Be quiet, don't output warnings" }, - { "hex", 'h', POPT_ARG_NONE, &hexformat, 0, "Output format readable by text2pcap" }, + { "quiet", 'q', POPT_ARG_NONE, NULL, 'q', "Be quiet, don't output warnings" }, + { "hex", 'h', POPT_ARG_NONE, NULL, 'h', "Output format readable by text2pcap" }, POPT_TABLEEND }; @@ -245,6 +245,12 @@ int main (int argc, char **argv) while((opt = poptGetNextOpt(pc)) != -1) { switch (opt) { + case 'q': + quiet = true; + break; + case 'h': + hexformat = true; + break; } } -- cgit