diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-10 09:05:32 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-10 09:05:32 +0000 |
commit | b85ca4e26b61471cd17e9468efbb49c56b77fdb9 (patch) | |
tree | 51fe0e01ae5665a98f4b28fda241ee244ca80e8e /json.c | |
parent | dad8b2b68113840c826e43e3857c487498271c85 (diff) | |
download | gpsd-b85ca4e26b61471cd17e9468efbb49c56b77fdb9.tar.gz |
Son of the Splint Cleanup.
Major change in this set is enforcong consistency about the data type
of serial parity information.
Diffstat (limited to 'json.c')
-rw-r--r-- | json.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -196,7 +196,7 @@ static int json_internal_read_object(const char *cp, } state = await_value; if (cursor->type == string) - maxlen = cursor->len - 1; + maxlen = (int)cursor->len - 1; else if (cursor->type == check) maxlen = strlen(cursor->dflt.check); else if (cursor->map != NULL) @@ -327,7 +327,7 @@ static int json_internal_read_object(const char *cp, (void)strncpy(lptr, valbuf, cursor->len); break; case boolean: - *((bool *)lptr) = (bool)!strcmp(valbuf, "true"); + *((bool *)lptr) = (strcmp(valbuf, "true") == 0); break; case character: if (strlen(valbuf) > 1) |