Merge pull request #17692 from yuwata/ipv4ll

network: fold ipv4ll fallback modes into normal ipv4ll addressing
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-12-01 21:59:30 +01:00
committed by GitHub
16 changed files with 108 additions and 150 deletions
+2 -3
View File
@@ -28,13 +28,12 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
#define _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_BOOLEAN(name,type,yes,scope) \
scope type name##_from_string(const char *s) { \
int b; \
if (!s) \
return -1; \
b = parse_boolean(s); \
int b = parse_boolean(s); \
if (b == 0) \
return (type) 0; \
else if (b > 0) \
if (b > 0) \
return yes; \
return (type) string_table_lookup(name##_table, ELEMENTSOF(name##_table), s); \
}