]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
don't warn on the loading of zero length files. This fixes the
authorAndrew Tridgell <tridge@samba.org>
Fri, 28 Jun 2002 02:54:40 +0000 (02:54 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 28 Jun 2002 02:54:40 +0000 (02:54 +0000)
'valid.dat' warning

source/lib/util_file.c

index 883827a4f5f8444f02a946a02f24e4c87740bf85..90cb022f587769819f631297972bbc6c40334470 100644 (file)
@@ -450,7 +450,7 @@ void *map_file(char *fname, size_t size)
 #endif
        if (!p) {
                p = file_load(fname, &s2);
-               if (!p || s2 != size) {
+               if (!p || (s2 != 0 && s2 != size)) {
                        DEBUG(1,("incorrect size for %s - got %d expected %d\n",
                                 fname, s2, size));
                        if (p) free(p);