From 5251c21479e0910f3c8ca688334eeace35a0a61d Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Thu, 24 Jul 2008 07:32:56 +0200 Subject: [PATCH] corrected alphabetical order of options (proxy-auth); bad conditional with token --- CHANGES | 4 ++++ VERSION | 2 +- procan-cdefs.c | 2 +- xioopts.c | 12 ++++-------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index 93b8802..e37d601 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,10 @@ corrections: additional empty arguments (thanks to Olivier Hervieu for reporting this bug) + corrected alphabetical order of options (proxy-auth) + + some minor corrections + improved test.sh script ####################### V 1.6.0.1: diff --git a/VERSION b/VERSION index 6d51c99..c6a20a5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -"1.6.0.1+ip4bind+recvfromfork+x64+execstderr+execspaces" +"1.6.0.1+ip4bind+recvfromfork+x64+execstderr+execspaces+cosmetics" diff --git a/procan-cdefs.c b/procan-cdefs.c index b305578..c5a7116 100644 --- a/procan-cdefs.c +++ b/procan-cdefs.c @@ -20,7 +20,7 @@ int procan_cdefs(FILE *outfile) { fprintf(outfile, "#define FD_SETSIZE %u\n", FD_SETSIZE); #endif #ifdef NFDBITS - fprintf(outfile, "#define NFDBITS %u\n", (unsigned int)NFDBITS); + fprintf(outfile, "#define NFDBITS "F_Zu"\n", NFDBITS); #endif #ifdef O_RDONLY fprintf(outfile, "#define O_RDONLY %u\n", O_RDONLY); diff --git a/xioopts.c b/xioopts.c index d3bc636..0652073 100644 --- a/xioopts.c +++ b/xioopts.c @@ -1046,8 +1046,8 @@ const struct optname optionnames[] = { #ifdef SO_PROTOTYPE IF_SOCKET ("prototype", &opt_so_prototype) #endif - IF_PROXY ("proxy-authorization", &opt_proxy_authorization) IF_PROXY ("proxy-auth", &opt_proxy_authorization) + IF_PROXY ("proxy-authorization", &opt_proxy_authorization) IF_PROXY ("proxy-resolve", &opt_proxy_resolve) IF_PROXY ("proxyauth", &opt_proxy_authorization) IF_PROXY ("proxyport", &opt_proxyport) @@ -1304,7 +1304,7 @@ const struct optname optionnames[] = { #ifdef SO_USELOOPBACK /* AIX433, Solaris */ IF_SOCKET ("so-useloopback", &opt_so_useloopback) #endif /* SO_USELOOPBACK */ - IF_SOCKS4 ("socksport", &opt_socksport) + IF_SOCKS4 ("socksport", &opt_socksport) IF_SOCKS4 ("socksuser", &opt_socksuser) IF_IPAPP ("sourceport", &opt_sourceport) IF_IPAPP ("sp", &opt_sourceport) @@ -1714,12 +1714,8 @@ int parseopts_table(const char **a, unsigned int groups, struct opt **opts, case TYPE_BYTE: { unsigned long ul; - if (token) { - char *rest; - ul = strtoul(token, &rest/*!*/, 0); - } else { - ul = 1; - } + char *rest; + ul = strtoul(token, &rest/*!*/, 0); if (ul > UCHAR_MAX) { Error3("parseopts(%s): byte value exceeds limit (%lu vs. %u), using max", a0, ul, UCHAR_MAX);