fix fstat error check
authorEugene Crosser <Eugene.Crosser@ru.ibm.com>
Fri, 15 Nov 2013 13:56:31 +0000 (17:56 +0400)
committerEugene Crosser <Eugene.Crosser@ru.ibm.com>
Fri, 15 Nov 2013 13:56:31 +0000 (17:56 +0400)
authfile.c

index f1ac1509379c1ba15ee4250f89b4ca1113189fbd..83477e4c904b4a54e65d6f4890478cca7ca11a69 100644 (file)
@@ -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;