mirror of
https://github.com/systemd/systemd.git
synced 2025-01-05 13:18:06 +03:00
basic/string-table: reduce variable scope
This commit is contained in:
parent
5992f362bf
commit
6b9f5f01cb
@ -4,12 +4,10 @@
|
||||
#include "string-util.h"
|
||||
|
||||
ssize_t string_table_lookup(const char * const *table, size_t len, const char *key) {
|
||||
size_t i;
|
||||
|
||||
if (!key)
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < len; ++i)
|
||||
for (size_t i = 0; i < len; ++i)
|
||||
if (streq_ptr(table[i], key))
|
||||
return (ssize_t) i;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user