diff options
author | marekm72 <35698605+marekm72@users.noreply.github.com> | 2025-02-28 18:13:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-28 18:13:04 +0100 |
commit | 696c5eecb1e4ff6f8a199addcfef65336bd651d2 (patch) | |
tree | 4cbfbf4b9e2ad3d75339cde6d4b148416103b839 | |
parent | 19057ff87f8f9ce3393cdfae75f13f4a4483e3f7 (diff) | |
download | mod_ip-patch-1.tar.gz mod_ip-patch-1.zip |
Update mod_ip.c to fix gcc warningspatch-1
-rw-r--r-- | mod_ip.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -94,6 +94,8 @@ #include <apr_strings.h> #include <apr_network_io.h> +#include "ip2asn.h" + /* Those unfortunately look like they claim the autoconf variables, so let's undefine them */ #undef PACKAGE_VERSION @@ -163,7 +165,7 @@ typedef struct } mod_ip_svr_cfg; -static void *mod_ip_create_svr_conf (apr_pool_t * pool, char *x); +static void *mod_ip_create_svr_conf (apr_pool_t * pool, server_rec *x); static void *mod_ip_merge_svr_conf (apr_pool_t * pool, void *BASE, void *ADD); static void mod_ip_hooks (apr_pool_t * pool); static const char *mod_ip_config_subnet (cmd_parms * cmd, void *CFG, const char *arg1, const char *arg2); @@ -378,7 +380,7 @@ gen_output (request_rec * r, struct mod_ip_request_t *formdata) myip = formdata->testip; /* If Teredo or 6to4, don't do ASN lookups. The data will always show *some* ISP, but it isn't ours.*/ - if ((strncmp(myip,"2001:0:",7)==NULL) || (strncmp(myip,"2002:",5)==NULL)) { + if ((strncmp(myip, "2001:0:", 7) == 0) || (strncmp(myip, "2002:", 5) == 0)) { formdata->getasn=0; } @@ -395,7 +397,7 @@ gen_output (request_rec * r, struct mod_ip_request_t *formdata) ap_rputs(p, r); output_len = strlen (p) + 4; - int my_asn ; + unsigned long int my_asn ; char * asn_name ; if (formdata->getasn) { @@ -583,7 +585,7 @@ mod_ip_config_subnet (cmd_parms * cmd, void *CFG, const char *arg1, const char * void * -mod_ip_create_svr_conf (apr_pool_t * pool, char *x) +mod_ip_create_svr_conf (apr_pool_t * pool, server_rec *x) { mod_ip_svr_cfg *svr = apr_pcalloc (pool, sizeof (mod_ip_svr_cfg)); svr->cidrinfo = apr_array_make (pool, MAX_PREFIXES, sizeof (cidrinfo_type)); |