From a619d66c4868be2394b60c59704bc670bc1344d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 25 May 2009 23:45:13 +0000 Subject: [PATCH] Use S_ISREG git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25231 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftp/ftp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appl/ftp/ftp/ftp.c b/appl/ftp/ftp/ftp.c index 826f2058c..a2ffd4ae1 100644 --- a/appl/ftp/ftp/ftp.c +++ b/appl/ftp/ftp/ftp.c @@ -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);