diff options
author | Jeremy Allison <jra@samba.org> | 2007-10-19 11:38:36 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-10-19 11:38:36 -0700 |
commit | 9a85533914119fb995fb61555c9f6e0018d4d181 (patch) | |
tree | 61bd1af2845f9fa2eb7632c1173d382131772798 /source3/utils/log2pcaphex.c | |
parent | 61e482cfdfec09ed01225320ba6a4acd47081f63 (diff) | |
download | samba-9a85533914119fb995fb61555c9f6e0018d4d181.tar.gz samba-9a85533914119fb995fb61555c9f6e0018d4d181.tar.bz2 samba-9a85533914119fb995fb61555c9f6e0018d4d181.zip |
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)
Diffstat (limited to 'source3/utils/log2pcaphex.c')
-rw-r--r-- | source3/utils/log2pcaphex.c | 14 |
1 files changed, 10 insertions, 4 deletions
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 <assert.h> -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; } } |