log_warning_errno(r, "Failed to set NUMA memory policy: %m");
}
-static void filter_args(const char* dst[], unsigned *pos, char **src, int argc) {
+static void filter_args(
+ const char* dst[],
+ size_t *dst_index,
+ char **src,
+ int argc) {
+
assert(dst);
- assert(pos);
+ assert(dst_index);
/* Copy some filtered arguments into the dst array from src. */
for (int i = 1; i < argc; i++) {
continue;
/* Seems we have a good old option. Let's pass it over to the new instance. */
- dst[*pos] = src[i];
- (*pos)++;
+ dst[(*dst_index)++] = src[i];
}
}
const char *switch_root_init,
const char **ret_error_message) {
- unsigned i, args_size;
+ size_t i, args_size;
const char **args;
int r;
+ assert(argc >= 0);
assert(saved_rlimit_nofile);
assert(saved_rlimit_memlock);
assert(ret_error_message);