summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2001-03-15 21:54:59 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2001-03-15 21:54:59 +0000
commitbd599666e57ecefe186b09b18e6c37090db359d4 (patch)
treebd39fdb4d7201bca41092d47c4d566fa6bb68150
parent32460c9819683cbb1bf5ed2b089639d17c69b169 (diff)
downloadlibapr-bd599666e57ecefe186b09b18e6c37090db359d4.tar.gz
Get rid of a warning about using maxbits uninitialized (the compiler
didn't realize we'd already checked the family) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61364 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--network_io/unix/sa_common.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/network_io/unix/sa_common.c b/network_io/unix/sa_common.c
index 7720848ee..b823a91fb 100644
--- a/network_io/unix/sa_common.c
+++ b/network_io/unix/sa_common.c
@@ -634,7 +634,7 @@ APR_DECLARE(apr_status_t) apr_ipsubnet_create(apr_ipsubnet_t **ipsub, const char
{
apr_status_t rv;
char *endptr;
- long bits, maxbits;
+ long bits, maxbits = 32;
/* filter out stuff which doesn't look remotely like an IP address; this helps
* callers like mod_access which have a syntax allowing hostname or IP address;
@@ -656,11 +656,8 @@ APR_DECLARE(apr_status_t) apr_ipsubnet_create(apr_ipsubnet_t **ipsub, const char
}
if (mask_or_numbits) {
- if ((*ipsub)->family == AF_INET) {
- maxbits = 32;
- }
#if APR_HAVE_IPV6
- else {
+ if ((*ipsub)->family == AF_INET6) {
maxbits = 128;
}
#endif