various: move const ptr indicator to return value
This commit is contained in:
@@ -15,7 +15,7 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
|
||||
|
||||
/* For basic lookup tables with strictly enumerated entries */
|
||||
#define _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,scope) \
|
||||
scope const char *name##_to_string(type i) { \
|
||||
scope const char* name##_to_string(type i) { \
|
||||
if (i < 0 || i >= (type) ELEMENTSOF(name##_table)) \
|
||||
return NULL; \
|
||||
return name##_table[i]; \
|
||||
|
||||
Reference in New Issue
Block a user