diff options
author | Florian Weimer <fweimer@redhat.com> | 2013-12-19 11:14:09 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-21 18:35:55 -0500 |
commit | 66c7a5332a9ef33143ab57f5f0d1cff0dc4d6ac5 (patch) | |
tree | 6401c9cc5044c48450d23a2038c688fa2a264749 | |
parent | 6887ec4f00d7c10cd70da3e10d570684bf32d28d (diff) |
login: replace readdir_r with readdir
-rw-r--r-- | src/login/sd-login.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/login/sd-login.c b/src/login/sd-login.c index c9a2e8a07f..2930b8751f 100644 --- a/src/login/sd-login.c +++ b/src/login/sd-login.c @@ -555,13 +555,13 @@ _public_ int sd_get_uids(uid_t **users) { for (;;) { struct dirent *de; - union dirent_storage buf; int k; uid_t uid; - k = readdir_r(d, &buf.de, &de); - if (k != 0) - return -k; + errno = 0; + de = readdir(d); + if (!de && errno != 0) + return -errno; if (!de) break; |