diff options
-rw-r--r-- | epan/ftypes/ftype-bytes.c | 38 | ||||
-rw-r--r-- | epan/proto.c | 3 | ||||
-rw-r--r-- | epan/proto.h | 13 |
3 files changed, 16 insertions, 38 deletions
diff --git a/epan/ftypes/ftype-bytes.c b/epan/ftypes/ftype-bytes.c index e591c5bbf4..c1d57f0bbd 100644 --- a/epan/ftypes/ftype-bytes.c +++ b/epan/ftypes/ftype-bytes.c @@ -139,44 +139,24 @@ bytes_to_repr(fvalue_t *fv, ftrepr_t rtype, int field_display, char *buf, unsign separator = '-'; break; case SEP_SPACE: - separator = ' '; - break; case SEP_COLON: - separator = ':'; - break; - case SEP_NONE: - break; case BASE_NONE: default: separator = ':'; break; } - if(FIELD_DISPLAY(field_display) != SEP_NONE){ - if (fv->value.bytes->len) { - buf = bytes_to_hexstr_punct(buf, fv->value.bytes->data, fv->value.bytes->len, separator); - } - else { - if (rtype == FTREPR_DFILTER) { - /* An empty byte array in a display filter is represented as "" */ - *buf++ = '"'; - *buf++ = '"'; - } - } - *buf = '\0'; - }else{ - if (fv->value.bytes->len) { - buf = bytes_to_hexstr(buf, fv->value.bytes->data, fv->value.bytes->len); - } - else { - if (rtype == FTREPR_DFILTER) { - /* An empty byte array in a display filter is represented as "" */ - *buf++ = '"'; - *buf++ = '"'; - } + if (fv->value.bytes->len) { + buf = bytes_to_hexstr_punct(buf, fv->value.bytes->data, fv->value.bytes->len, separator); + } + else { + if (rtype == FTREPR_DFILTER) { + /* An empty byte array in a display filter is represented as "" */ + *buf++ = '"'; + *buf++ = '"'; } - *buf = '\0'; } + *buf = '\0'; } static void diff --git a/epan/proto.c b/epan/proto.c index f825f0d2bc..650318a55a 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -7849,7 +7849,6 @@ tmp_fld_check_assert(header_field_info *hfinfo) */ switch (FIELD_DISPLAY(hfinfo->display)) { case BASE_NONE: - case SEP_NONE: case SEP_DOT: case SEP_DASH: case SEP_COLON: @@ -7857,7 +7856,7 @@ tmp_fld_check_assert(header_field_info *hfinfo) break; default: tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Bit count: %d)"); - g_error("Field '%s' (%s) is an byte array but is being displayed as %s instead of BASE_NONE, SEP_NONE, SEP_DOT, SEP_DASH, SEP_COLON, or SEP_SPACE\n", + g_error("Field '%s' (%s) is an byte array but is being displayed as %s instead of BASE_NONE, SEP_DOT, SEP_DASH, SEP_COLON, or SEP_SPACE\n", hfinfo->name, hfinfo->abbrev, tmp_str); wmem_free(NULL, tmp_str); } diff --git a/epan/proto.h b/epan/proto.h index f4b237913b..d972189393 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -583,19 +583,18 @@ typedef enum { SEP_DASH = 9, /**< hexadecimal bytes with a dash (-) between each byte */ SEP_COLON = 10, /**< hexadecimal bytes with a colon (:) between each byte */ SEP_SPACE = 11, /**< hexadecimal bytes with a space between each byte */ - SEP_NONE = 12, /**< hexadecimal bytes with no separator between each byte */ /* Address types */ - BASE_NETMASK = 13, /**< Used for IPv4 address that shouldn't be resolved (like for netmasks) */ + BASE_NETMASK = 12, /**< Used for IPv4 address that shouldn't be resolved (like for netmasks) */ /* Port types */ - BASE_PT_UDP = 14, /**< UDP port */ - BASE_PT_TCP = 15, /**< TCP port */ - BASE_PT_DCCP = 16, /**< DCCP port */ - BASE_PT_SCTP = 17, /**< SCTP port */ + BASE_PT_UDP = 13, /**< UDP port */ + BASE_PT_TCP = 14, /**< TCP port */ + BASE_PT_DCCP = 15, /**< DCCP port */ + BASE_PT_SCTP = 16, /**< SCTP port */ /* OUI types */ - BASE_OUI = 18 /**< OUI resolution */ + BASE_OUI = 17 /**< OUI resolution */ } field_display_e; |