Lines 1-56
Link Here
|
1 |
--- src/log.cc.orig 2018-02-04 09:36:17 UTC |
1 |
--- src/log.cc.orig 2018-08-28 11:26:42 UTC |
2 |
+++ src/log.cc |
2 |
+++ src/log.cc |
3 |
@@ -37,7 +37,7 @@ int CommonLogParser::parse(char *logline, struct logbi |
3 |
@@ -72,7 +72,7 @@ int CommonLogParser::parse(char *logline, struct logbi |
4 |
if (!bufcp) |
4 |
/* fire off a query with adns */ |
5 |
return -1; |
5 |
b->dns_query = new adns_query; |
6 |
|
6 |
adns_submit(adns, ptr, adns_r_a, |
7 |
- *bufcp = (char) NULL; |
7 |
- (adns_queryflags) NULL, NULL, b->dns_query); |
8 |
+ *bufcp = '\0'; |
8 |
+ (adns_queryflags) 0, 0, b->dns_query); |
9 |
++bufcp; |
|
|
10 |
|
9 |
|
11 |
/* quickly figure out if this is an IP or a host. We do this by |
10 |
b->ip_pos = im->insert(RESOLVING_STRING); |
12 |
@@ -172,7 +172,7 @@ int CommonLogParser::parse(char *logline, struct logbi |
11 |
b->ip_hash = TTHash(RESOLVING_STRING); |
13 |
/* find the end of referrer and null it */ |
|
|
14 |
if (!(bufcp = strchr(bufsp, '"'))) |
15 |
return -1; |
16 |
- *bufcp = (char) NULL; |
17 |
+ *bufcp = '\0'; |
18 |
|
19 |
/* unless they want to keep it, skip over the protocol, ie http:// */ |
20 |
if ((cf.preserve_ref_protocol == 0) && (bufcp = strstr(bufsp, "://"))) |
21 |
@@ -230,7 +230,7 @@ char *LogParser::processURL(char **buf) /* {{{ */ |
22 |
return NULL; |
23 |
|
24 |
/* null the space in front of it */ |
25 |
- *endptr = (char) NULL; |
26 |
+ *endptr = '\0'; |
27 |
|
28 |
/* TODO maybe we can use the protocol someday.. */ |
29 |
|
30 |
@@ -258,7 +258,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{ |
31 |
char *bufcp, *endptr, *workptr; |
32 |
|
33 |
endptr = *url + *length; |
34 |
- *endptr = (char) NULL; |
35 |
+ *endptr = '\0'; |
36 |
|
37 |
/* do we want to keep the query string? */ |
38 |
if (!cf.keep_querystring) |
39 |
@@ -273,7 +273,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{ |
40 |
if (workptr < endptr) |
41 |
{ |
42 |
/* we're ok */ |
43 |
- *workptr = (char) NULL; |
44 |
+ *workptr = '\0'; |
45 |
bufcp = workptr+1; |
46 |
} |
47 |
} |
48 |
@@ -308,7 +308,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{ |
49 |
if (workptr == endptr) |
50 |
bufcp = workptr; |
51 |
} |
52 |
- *bufcp = (char) NULL; |
53 |
+ *bufcp = '\0'; |
54 |
} |
55 |
|
56 |
|