From: Baptiste Daroussin Date: Thu, 27 Oct 2022 09:56:52 +0000 (+0200) Subject: mlmmj-maintd: remove useless stat X-Git-Tag: RELEASE_1_4_0a1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3902f0fefb77e0c832e6d09ff6aeabc59bf31a44;p=thirdparty%2Fmlmmj.git mlmmj-maintd: remove useless stat the directory is anyway open just after and if failed the content is ignored --- diff --git a/src/mlmmj-maintd.c b/src/mlmmj-maintd.c index 2da0497a..a8784ad6 100644 --- a/src/mlmmj-maintd.c +++ b/src/mlmmj-maintd.c @@ -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;