diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-06-16 23:26:58 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-17 06:05:07 +0000 |
commit | 22fb7a598b91fbf7ec7f499c405669bae6520fe8 (patch) | |
tree | 2366801d9188a64b7ae543904f384bbd15ce0883 | |
parent | 0ca6a6da62393e266c983db585a75573908113b9 (diff) |
mswsp: Remove null check (CID1355407)
value->type is already asserted as not null (and probably shouldn't be).
Change-Id: I574d3e7e0d5c636e6b731c1c817f2e457447afc1
Reviewed-on: https://code.wireshark.org/review/15990
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-mswsp.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/epan/dissectors/packet-mswsp.c b/epan/dissectors/packet-mswsp.c index 0d7604d825..9e8a8b5086 100644 --- a/epan/dissectors/packet-mswsp.c +++ b/epan/dissectors/packet-mswsp.c @@ -4350,8 +4350,8 @@ static int parse_CBaseStorageVariant(tvbuff_t *tvb, int offset, proto_tree *pare parse_vType(tvb, offset, &value->vType); value->type = vType_get_type(value->vType); - DISSECTOR_ASSERT(value->type != NULL); + ti_type = proto_tree_add_string(tree, hf_mswsp_cbasestorvariant_vtype, tvb, offset, 2, value->type->str); offset += 2; @@ -4365,10 +4365,6 @@ static int parse_CBaseStorageVariant(tvbuff_t *tvb, int offset, proto_tree *pare highType = (enum vType)(value->vType & 0xFF00); - if (value->type == NULL) { - goto not_supported; - } - ti_val = proto_tree_add_string(tree, hf_mswsp_cbasestorvariant_vvalue, tvb, offset, 0, ""); switch (highType) { @@ -4426,11 +4422,6 @@ static int parse_CBaseStorageVariant(tvbuff_t *tvb, int offset, proto_tree *pare proto_item_append_text(ti_val, " %s", str_CBaseStorageVariant(value, FALSE)); proto_item_append_text(ti, " %s", str_CBaseStorageVariant(value, TRUE)); - goto done; - -not_supported: - proto_item_append_text(ti, ": sorry, vType %02x not handled yet!", (unsigned)value->vType); -done: return offset; } |