tree-wide: coccinelle fixes

Yet another batch of Coccinelle fixes.
This commit is contained in:
Frantisek Sumsal
2021-07-09 20:54:22 +01:00
committed by Luca Boccassi
parent 0de0ba573b
commit 2f0927626a
7 changed files with 11 additions and 15 deletions
+1 -3
View File
@@ -171,10 +171,8 @@ static int find_free_uid(const char *directory, uid_t max_uid, uid_t *current_ui
/* We want to use the UID also as GID, hence check for it in /etc/group too */
r = check_etc_group_collisions(directory, NULL, (gid_t) *current_uid);
if (r < 0)
if (r <= 0)
return r;
if (r == 0) /* free! yay! */
return 0;
}
}
+1 -1
View File
@@ -4091,7 +4091,7 @@ static int make_uid_map_string(
int r;
assert(n_bind_user_uid == 0 || bind_user_uid);
assert(offset == 0 || offset == 2); /* used to switch between UID and GID map */
assert(IN_SET(offset, 0, 2)); /* used to switch between UID and GID map */
assert(ret);
/* The bind_user_uid[] array is a series of 4 uid_t values, for each --bind-user= entry one