Use S_ISREG
authorLove Hörnquist Åstrand <lha@kth.se>
Mon, 25 May 2009 23:45:13 +0000 (23:45 +0000)
committerLove Hörnquist Åstrand <lha@kth.se>
Mon, 25 May 2009 23:45:13 +0000 (23:45 +0000)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25231 ec53bebd-3082-4978-b11e-865c3cabbd6b

appl/ftp/ftp/ftp.c

index 826f2058c391aa983f7c4ada4ed0a9d94d4e9d2b..a2ffd4ae163dc7761825da61fd38ad348e5dd715 100644 (file)
@@ -731,8 +731,7 @@ sendrequest (char *cmd, char *local, char *remote, char *lmode, int printnames)
            return;
        }
        closefunc = fclose;
-       if (fstat (fileno (fin), &st) < 0 ||
-           (st.st_mode & S_IFMT) != S_IFREG) {
+       if (fstat (fileno (fin), &st) < 0 || !S_ISREG(st.st_mode)) {
            fprintf (stdout, "%s: not a plain file.\n", local);
            signal (SIGINT, oldintr);
            fclose (fin);