Skip to content

Commit

Permalink
parser.c: fix warning: comparison of array 'hour' equal to a null poi…
Browse files Browse the repository at this point in the history
…nter is always false

  https://travis-ci.org/allinurl/goaccess/jobs/305616842#L2488-L2491

  src/parser.c:2356:7: warning: comparison of array 'hour' equal to a null pointer
        is always false [-Wtautological-pointer-compare]
    if (hour == '\0')
        ^~~~    ~~~~
  1 warning generated.
  • Loading branch information
TerraTech committed Nov 28, 2017
1 parent 72a334f commit 6ccc2f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -2353,7 +2353,7 @@ gen_visit_time_key (GKeyData * kdata, GLogItem * logitem)
0)
return 1;

if (hour == '\0')
if (*hour == '\0')
return 1;

if ((hmark = strchr (hour, ':')))
Expand Down

0 comments on commit 6ccc2f6

Please sign in to comment.