diff options
author | Adrian Granados <adrian@adriangranados.com> | 2018-05-23 18:28:32 -0400 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2018-06-01 09:19:23 +0000 |
commit | 4e82b0b6dacf6d8a818c20cec62014762cf31abf (patch) | |
tree | a3660b917dae20c0f40a204e7dfde034e04f542b /epan/addr_resolv.c | |
parent | c9ba7c95dfe16c55affc47741cea533866b2dc70 (diff) |
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 <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/addr_resolv.c')
-rw-r--r-- | epan/addr_resolv.c | 7 |
1 files changed, 2 insertions, 5 deletions
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 { |