From 4e82b0b6dacf6d8a818c20cec62014762cf31abf Mon Sep 17 00:00:00 2001 From: Adrian Granados Date: Wed, 23 May 2018 18:28:32 -0400 Subject: Remove tabs around manuf names as shown for BASE_OUI And handle comments in manuf file entries correctly. There are entries in the manuf file where columns are separated by two or more tab characters. These extra tab characters are not being trimmed from the manuf name. OUI: 00:40:96 ( Cisco Systems, Inc.) -> OUI: 00:40:96 (Cisco Systems, Inc.) Change-Id: Ie6545480848bb84c20bea6566a3ccf11c7ed9233 Reviewed-on: https://code.wireshark.org/review/27759 Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu --- epan/addr_resolv.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'epan/addr_resolv.c') diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index 02e68187a2..9049764334 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -1284,11 +1284,8 @@ parse_ether_line(char *line, ether_t *eth, unsigned int *mask, return -1; if ((cp = strchr(line, '#'))) { - cp--; - while (g_ascii_isspace(*cp)) { - cp--; - } *cp = '\0'; + g_strchomp(line); } if ((cp = strtok(line, " \t")) == NULL) @@ -1302,7 +1299,7 @@ parse_ether_line(char *line, ether_t *eth, unsigned int *mask, g_strlcpy(eth->name, cp, MAXNAMELEN); - if ((cp = strtok(NULL, "")) != NULL) + if ((cp = strtok(NULL, "\t")) != NULL) { g_strlcpy(eth->longname, cp, MAXNAMELEN); } else { -- cgit v1.2.3