]> git.ipfire.org Git - thirdparty/git.git/blobdiff - xdiff-interface.c
nonblock: support Windows
[thirdparty/git.git] / xdiff-interface.c
index 2e3a5a2943e7fc28e79a425fcbdb01da0b0567b0..e87950de32e5602765de26953ce7ec812ef30925 100644 (file)
@@ -159,7 +159,7 @@ int read_mmfile(mmfile_t *ptr, const char *filename)
 
        if (stat(filename, &st))
                return error_errno("Could not stat %s", filename);
-       if ((f = fopen(filename, "rb")) == NULL)
+       if (!(f = fopen(filename, "rb")))
                return error_errno("Could not open %s", filename);
        sz = xsize_t(st.st_size);
        ptr->ptr = xmalloc(sz ? sz : 1);