diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-11-16 09:07:54 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-11-16 09:07:54 +0100 |
commit | 48493306d27a1e2f7750228a37c32e892ffbb310 (patch) | |
tree | ad05f41259f07f695498c83e14aad95c6ab7c97c /lookup.c | |
parent | 3d84a7208988ad641599271d5bfde078c2fc9b4c (diff) |
lookup: Return const char * from all lookup functions
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'lookup.c')
-rw-r--r-- | lookup.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -127,7 +127,7 @@ void lookup_cleanup(enum lookup_type which) lookup_initialized[which] = false; } -static inline char *__lookup_inline(unsigned int id, struct hash_table *tbl) +static inline const char *__lookup_inline(unsigned int id, struct hash_table *tbl) { struct lookup_entry *entry = lookup_hash(id, tbl); @@ -137,22 +137,22 @@ static inline char *__lookup_inline(unsigned int id, struct hash_table *tbl) return (entry && id == entry->id ? entry->str : NULL); } -char *lookup_ether_type(unsigned int id) +const char *lookup_ether_type(unsigned int id) { return __lookup_inline(id, &lookup_tables[LT_ETHERTYPES]); } -char *lookup_port_udp(unsigned int id) +const char *lookup_port_udp(unsigned int id) { return __lookup_inline(id, &lookup_tables[LT_PORTS_UDP]); } -char *lookup_port_tcp(unsigned int id) +const char *lookup_port_tcp(unsigned int id) { return __lookup_inline(id, &lookup_tables[LT_PORTS_TCP]); } -char *lookup_vendor(unsigned int id) +const char *lookup_vendor(unsigned int id) { return __lookup_inline(id, &lookup_tables[LT_OUI]); } |