mirror of
https://github.com/systemd/systemd
synced 2024-07-22 02:34:54 +00:00
fdset: use FOREACH_ARRAY at one more place
This commit is contained in:
parent
1276e63370
commit
1cbd441b09
|
@ -40,8 +40,8 @@ int fdset_new_array(FDSet **ret, const int fds[], size_t n_fds) {
|
|||
if (!s)
|
||||
return -ENOMEM;
|
||||
|
||||
for (size_t i = 0; i < n_fds; i++) {
|
||||
r = fdset_put(s, fds[i]);
|
||||
FOREACH_ARRAY(fd, fds, n_fds) {
|
||||
r = fdset_put(s, *fd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue