Skip to content

Commit 52a475c

Browse files
Improve the assertion.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 84d060f commit 52a475c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_posixsubprocess.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ child_exec(char *const exec_array[],
768768

769769
#ifdef HAVE_SETGROUPS
770770
if (extra_group_size >= 0) {
771-
assert((extra_group_size == 0 && extra_groups == NULL) || extra_group_size);
771+
assert((extra_group_size == 0) == (extra_groups == NULL));
772772
POSIX_CALL(setgroups(extra_group_size, extra_groups));
773773
}
774774
#endif /* HAVE_SETGROUPS */

0 commit comments

Comments
 (0)