1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

basic/string-table: remove unnecessary brackets

This commit is contained in:
Mike Yuan 2024-03-25 23:10:52 +08:00
parent b21d56e82c
commit 981b033510
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3

View File

@ -47,10 +47,8 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
s = strdup(name##_table[i]); \
if (!s) \
return -ENOMEM; \
} else { \
if (asprintf(&s, "%i", i) < 0) \
return -ENOMEM; \
} \
} else if (asprintf(&s, "%i", i) < 0) \
return -ENOMEM; \
*str = s; \
return 0; \
}