We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 333c399 commit 2b4f573Copy full SHA for 2b4f573
bin/xbps-checkvers/main.c
@@ -615,20 +615,15 @@ static int
615
rcv_process_dir(rcv_t *rcv, rcv_proc_func process)
616
{
617
DIR *dir = NULL;
618
- struct dirent entry, *result;
+ struct dirent *result;
619
struct stat st;
620
char filename[BUFSIZ];
621
- int i, ret = 0;
+ int ret = 0;
622
623
if (!(dir = opendir(".")))
624
goto error;
625
626
- for (;;) {
627
- i = readdir_r(dir, &entry, &result);
628
- if (i > 0)
629
- goto error;
630
- if (result == NULL)
631
- break;
+ while ((result = readdir(dir))) {
632
if ((strcmp(result->d_name, ".") == 0) ||
633
(strcmp(result->d_name, "..") == 0))
634
continue;
0 commit comments