nulstr-util: Declare NULSTR_FOREACH() iterator inline
This commit is contained in:
@@ -158,7 +158,6 @@ int main(int argc, char *argv[]) {
|
||||
else
|
||||
arg_start = getpid_cached();
|
||||
|
||||
const char *i;
|
||||
NULSTR_FOREACH(i, "zeros\0simple\0random\0") {
|
||||
#if HAVE_XZ
|
||||
test_compress_decompress("XZ", i, compress_blob_xz, decompress_blob_xz);
|
||||
|
||||
@@ -800,7 +800,6 @@ TEST(print_securities) {
|
||||
|
||||
TEST(condition_test_virtualization) {
|
||||
Condition *condition;
|
||||
const char *virt;
|
||||
int r;
|
||||
|
||||
condition = condition_new(CONDITION_VIRTUALIZATION, "garbage oifdsjfoidsjoj", false, false);
|
||||
|
||||
@@ -452,8 +452,8 @@ TEST(hashmap_foreach_key) {
|
||||
|
||||
m = hashmap_new(&string_hash_ops);
|
||||
|
||||
NULSTR_FOREACH(key, key_table)
|
||||
hashmap_put(m, key, (void*) (const char*) "my dummy val");
|
||||
NULSTR_FOREACH(k, key_table)
|
||||
hashmap_put(m, k, (void*) (const char*) "my dummy val");
|
||||
|
||||
HASHMAP_FOREACH_KEY(s, key, m) {
|
||||
assert_se(s);
|
||||
|
||||
@@ -56,7 +56,6 @@ TEST(basic_enumerate) {
|
||||
|
||||
TEST(sd_hwdb_new_from_path) {
|
||||
_cleanup_(sd_hwdb_unrefp) sd_hwdb *hwdb = NULL;
|
||||
const char *hwdb_bin_path = NULL;
|
||||
int r;
|
||||
|
||||
assert_se(sd_hwdb_new_from_path(NULL, &hwdb) == -EINVAL);
|
||||
|
||||
@@ -117,7 +117,7 @@ TEST(seccomp_arch_to_string) {
|
||||
}
|
||||
|
||||
TEST(architecture_table) {
|
||||
const char *n, *n2;
|
||||
const char *n2;
|
||||
|
||||
NULSTR_FOREACH(n,
|
||||
"native\0"
|
||||
@@ -234,7 +234,7 @@ TEST(filter_sets_ordered) {
|
||||
assert_se(streq(syscall_filter_sets[SYSCALL_FILTER_SET_KNOWN].name, "@known"));
|
||||
|
||||
for (size_t i = 0; i < _SYSCALL_FILTER_SET_MAX; i++) {
|
||||
const char *k, *p = NULL;
|
||||
const char *p = NULL;
|
||||
|
||||
/* Make sure each group has a description */
|
||||
assert_se(!isempty(syscall_filter_sets[0].help));
|
||||
|
||||
@@ -948,7 +948,6 @@ TEST(strv_extend_n) {
|
||||
static void test_strv_make_nulstr_one(char **l) {
|
||||
_cleanup_free_ char *b = NULL, *c = NULL;
|
||||
_cleanup_strv_free_ char **q = NULL;
|
||||
const char *s = NULL;
|
||||
size_t n, m;
|
||||
unsigned i = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user