Skip to content

Commit ff7084a

Browse files
committed
Updated code formatting.
1 parent a1447d9 commit ff7084a

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

src/parser.c

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,11 +1674,17 @@ static int
16741674
verify_missing_fields (GLogItem *logitem) {
16751675
/* must have the following fields */
16761676
if (logitem->host == NULL)
1677-
logitem->errstr = xstrdup ("IPv4/6 is required. You have to add format specifier '%h' [host (the client IP address, either IPv4 or IPv6)] to your log-format.");
1677+
logitem->errstr =
1678+
xstrdup
1679+
("IPv4/6 is required. You have to add format specifier '%h' [host (the client IP address, either IPv4 or IPv6)] to your log-format.");
16781680
else if (logitem->date == NULL)
1679-
logitem->errstr = xstrdup ("A valid date is required. You have to add format specifier '%x' [Datetime] or '%d' [Date] and '%t' [Time] to your log-format.");
1681+
logitem->errstr =
1682+
xstrdup
1683+
("A valid date is required. You have to add format specifier '%x' [Datetime] or '%d' [Date] and '%t' [Time] to your log-format.");
16801684
else if (logitem->req == NULL)
1681-
logitem->errstr = xstrdup ("A request is required. Your log-format is missing format specifier '%r' [The request line from the client] or combination of special format specifiers such as '%m', '%U', '%q' and '%H' to parse individual fields.");
1685+
logitem->errstr =
1686+
xstrdup
1687+
("A request is required. Your log-format is missing format specifier '%r' [The request line from the client] or combination of special format specifiers such as '%m', '%U', '%q' and '%H' to parse individual fields.");
16821688

16831689
return logitem->errstr != NULL;
16841690
}
@@ -2048,18 +2054,18 @@ parse_line (GLog *glog, char *line, int dry_run, GLogItem **logitem_out) {
20482054

20492055
// concatenate vhost to request
20502056
if (conf.concat_vhost_req) {
2051-
size_t vhost_len = logitem->vhost ? strlen(logitem->vhost) : 0;
2052-
size_t req_len = logitem->req ? strlen(logitem->req) : 0;
2053-
char *new_req = xmalloc(vhost_len + req_len + 1);
2057+
size_t vhost_len = logitem->vhost ? strlen (logitem->vhost) : 0;
2058+
size_t req_len = logitem->req ? strlen (logitem->req) : 0;
2059+
char *new_req = xmalloc (vhost_len + req_len + 1);
20542060

20552061
if (vhost_len)
2056-
memcpy(new_req, logitem->vhost, vhost_len);
2062+
memcpy (new_req, logitem->vhost, vhost_len);
20572063
if (req_len)
2058-
memcpy(new_req + vhost_len, logitem->req, req_len);
2064+
memcpy (new_req + vhost_len, logitem->req, req_len);
20592065

20602066
new_req[vhost_len + req_len] = '\0';
20612067

2062-
free(logitem->req);
2068+
free (logitem->req);
20632069
logitem->req = new_req;
20642070
}
20652071

@@ -2140,7 +2146,7 @@ fgetline (FILE *fp) {
21402146
}
21412147

21422148
/* Return partial line on EOF if we have data */
2143-
if (feof(fp) && line != NULL && linelen > 0)
2149+
if (feof (fp) && line != NULL && linelen > 0)
21442150
return line;
21452151

21462152
break;

0 commit comments

Comments
 (0)