]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
mlmmj-maintd: remove useless stat
authorBaptiste Daroussin <bapt@FreeBSD.org>
Thu, 27 Oct 2022 09:56:52 +0000 (11:56 +0200)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Thu, 27 Oct 2022 09:56:52 +0000 (11:56 +0200)
the directory is anyway open just after and if failed the content is
ignored

src/mlmmj-maintd.c

index 2da0497aba3935076b3c0c1492c830cec981853b..a8784ad6c08707a3b83ff7874c5cf6d068220af5 100644 (file)
@@ -855,7 +855,6 @@ int main(int argc, char **argv)
        int opt;
        char *bindir, *listdir = NULL, *mlmmjsend, *mlmmjbounce, *mlmmjunsub;
        char *dirlists = NULL;
-       struct stat st;
        struct dirent *dp;
        DIR *dirp;
        bool daemonize = true;
@@ -934,12 +933,6 @@ int main(int argc, char **argv)
                                        (strcmp(dp->d_name, ".") == 0))
                                continue;
 
-                       if (fstatat(dfd, dp->d_name, &st, 0) <0) {
-                               log_error(LOG_ARGS, "Could not stat(%s/%s)",
-                                   dirlists, dp->d_name);
-                               continue;
-                       }
-
                        int fd = openat(dfd, dp->d_name,  O_DIRECTORY);
                        if (fd == -1)
                                continue;