[systemd-devel] [PATCH 02/11] login: replace readdir_r with readdir
Florian Weimer
fweimer at redhat.com
Thu Dec 19 02:14:09 PST 2013
---
src/login/sd-login.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/login/sd-login.c b/src/login/sd-login.c
index c9a2e8a..2930b87 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;
--
1.8.3.1
More information about the systemd-devel
mailing list