From: Eugene Crosser Date: Fri, 15 Nov 2013 13:56:31 +0000 (+0400) Subject: fix fstat error check X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=commitdiff_plain;h=0f8ef77e919ff21eea4353e95fce97cc5f693d1d;ds=sidebyside fix fstat error check --- diff --git a/authfile.c b/authfile.c index f1ac150..83477e4 100644 --- a/authfile.c +++ b/authfile.c @@ -43,7 +43,7 @@ int update_authfile(const char *fn, const char *tokenid, const char *id, struct stat st; int fd = fileno(fp); - if (!fstat(fd, &st)) { + if (fstat(fd, &st)) { eprint("fstat \"%s\" (fd %d) error: %s", fn, fd, strerror(errno)); st.st_size = 2047;