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