diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 3b37d9a64c75..0e9651e1a006 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2490,7 +2490,7 @@ delete(char *name) perror_reply(550, name); return; } - if ((st.st_mode&S_IFMT) == S_IFDIR) { + if (S_ISDIR(st.st_mode)) { if (rmdir(name) < 0) { perror_reply(550, name); return;