chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
socket: make various socket/pipe options configurable
[elogind.git]
/
src
/
util.h
diff --git
a/src/util.h
b/src/util.h
index 91e0359e0c15d612a5c4ac264e96cb29bc6d50fb..eda8e5c406e4cb711f7dd95ba426f383e71ba57a 100644
(file)
--- 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++) \
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)) \
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 *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
#endif