summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index 91e0359e0c..eda8e5c406 100644
--- a/src/util.h
+++ b/src/util.h
@@ -226,7 +226,8 @@ unsigned long long random_ull(void);
unsigned u = 0; \
assert(s); \
for (i = 0; i < (type)ELEMENTSOF(name##_table); i++) \
- if (streq(name##_table[i], s)) \
+ if (name##_table[i] && \
+ streq(name##_table[i], s)) \
return i; \
if (safe_atou(s, &u) >= 0 && \
u < ELEMENTSOF(name##_table)) \
@@ -301,4 +302,7 @@ int sched_policy_from_string(const char *s);
const char *rlimit_to_string(int i);
int rlimit_from_string(const char *s);
+const char *ip_tos_to_string(int i);
+int ip_tos_from_string(const char *s);
+
#endif