Skip to content

Commit

Permalink
fix(library): fix warning spotted out by scan-build
Browse files Browse the repository at this point in the history
    json_helpers.c:167:17: warning: The right operand of '<' is a garbage value
                           [core.UndefinedBinaryOperatorResult]
      167 |   for (i = 0; i < ntoken; i++)
          |                 ^ ~~~~~~

Signed-off-by: Davide Madrisan <[email protected]>
  • Loading branch information
madrisan committed Sep 12, 2024
1 parent 12c581d commit e75fcb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/json_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int
json_search (const char *json, const char *path, char **value)
{
char *p, *object, *label, *saveptr;
size_t i, ntoken;
size_t i, ntoken = 0;
bool found_label = false, found_object = false;

dbg ("checking for %s in the json data...\n", path);
Expand Down

0 comments on commit e75fcb2

Please sign in to comment.