sr_parse_sizestring: Deal with invalid strings better.
This cleans up a warning generated by clang's static analyzer.
This commit is contained in:
parent
d386a52f64
commit
19e43ab21b
|
@ -426,7 +426,7 @@ SR_API int sr_parse_sizestring(const char *sizestring, uint64_t *size)
|
|||
} else
|
||||
*size += frac_part;
|
||||
|
||||
if (*s && strcasecmp(s, "Hz"))
|
||||
if (s && *s && strcasecmp(s, "Hz"))
|
||||
return SR_ERR;
|
||||
|
||||
return SR_OK;
|
||||
|
|
Loading…
Reference in New Issue