mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
string-table: make DUMP_STRING_TABLE() returns 0
Then, we can use it as === return DUMP_STRING_TABLE(...); ===
This commit is contained in:
parent
66d2c693ac
commit
2a92e0bc6c
@ -101,7 +101,7 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
|
||||
_DEFINE_STRING_TABLE_LOOKUP_FROM_STRING_FALLBACK(name,type,max,static)
|
||||
|
||||
#define DUMP_STRING_TABLE(name,type,max) \
|
||||
do { \
|
||||
({ \
|
||||
flockfile(stdout); \
|
||||
for (type _k = 0; _k < (max); _k++) { \
|
||||
const char *_t; \
|
||||
@ -112,4 +112,5 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
|
||||
fputc_unlocked('\n', stdout); \
|
||||
} \
|
||||
funlockfile(stdout); \
|
||||
} while (false)
|
||||
0; \
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user