protobuf-c: parse_required_member(): Remove duplicate NULL check

`*pstr != NULL` was already checked here.

See https://github.com/protobuf-c/protobuf-c/issues/517.
This commit is contained in:
Robert Edmonds 2023-07-08 21:31:23 -04:00
parent 0ce231b16d
commit bee044643e

View File

@ -2557,7 +2557,7 @@ parse_required_member(ScannedMember *scanned_member,
if (maybe_clear && *pstr != NULL) {
const char *def = scanned_member->field->default_value;
if (*pstr != NULL && *pstr != def)
if (*pstr != def)
do_free(allocator, *pstr);
}
*pstr = do_alloc(allocator, len - pref_len + 1);