/* Optimize by skipping the whole process by not creating output directories
* if no generators are found. */
- STRV_FOREACH(path, (char**) paths)
+ STRV_FOREACH(path, paths)
if (access(*path, F_OK) == 0)
found = true;
else if (errno != ENOENT)
if (!c)
return log_oom();
- STRV_FOREACH_PAIR(a, b, (char**) title_table)
+ STRV_FOREACH_PAIR(a, b, title_table)
if (streq(*a, *i)) {
t = strdup(*b);
if (!t)
}
/* First read the first found main config file. */
- STRV_FOREACH(fn, (char**) conf_files) {
+ STRV_FOREACH(fn, conf_files) {
r = config_parse(NULL, *fn, NULL, sections, lookup, table, flags, userdata, &st);
if (r < 0)
return r;
j = strjoina(z, table[4]);
(void) symlink("foobar", j);
- STRV_FOREACH(a, (char**) table) {
+ STRV_FOREACH(a, table) {
_cleanup_free_ char *x = NULL, *y = NULL;
x = strjoin(z, *a);
continue;
}
- STRV_FOREACH(b, (char**) table) {
+ STRV_FOREACH(b, table) {
_cleanup_free_ char *w = NULL;
w = strjoin(z, *b);
};
TEST(sysctl_normalize) {
- STRV_FOREACH_PAIR(s, expected, (const char**) cases) {
+ STRV_FOREACH_PAIR(s, expected, cases) {
_cleanup_free_ char *t;
assert_se(t = strdup(*s));