Clean up the implementation of the <dirent.h> functions.

Change-Id: I3c647cc9588525afc41fee90ee468d58cd13503a
diff --git a/libc/bionic/sysconf.c b/libc/bionic/sysconf.c
index 7caa4e9..d21a703 100644
--- a/libc/bionic/sysconf.c
+++ b/libc/bionic/sysconf.c
@@ -85,9 +85,8 @@
   }
 
   int result = 0;
-  struct dirent de;
   struct dirent* e;
-  while (!readdir_r(d, &de, &e) && e != NULL) {
+  while ((e = readdir(d)) != NULL) {
     if (e->d_type == DT_DIR && __matches_cpuN(e->d_name)) {
       ++result;
     }