summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-06-28 03:19:20 +0000
committerAndrew Tridgell <tridge@samba.org>2002-06-28 03:19:20 +0000
commit060b73bd8e069633cb50381f4e3dd14f0fd99968 (patch)
tree81c2886550bbc48bbe143a103f95a5659819b5b2
parent5bc613c36299123118f046136132a96f5b7f6e8b (diff)
downloadsamba-060b73bd8e069633cb50381f4e3dd14f0fd99968.tar.gz
samba-060b73bd8e069633cb50381f4e3dd14f0fd99968.tar.bz2
samba-060b73bd8e069633cb50381f4e3dd14f0fd99968.zip
don't warn on non-existant files in map_file(), let the caller handle any warning
(This used to be commit 98a119ee58286b708a54dcba9ffcfbdcf8cb6bba)
-rw-r--r--source3/lib/util_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/util_file.c b/source3/lib/util_file.c
index 90cb022f58..611e0e40be 100644
--- a/source3/lib/util_file.c
+++ b/source3/lib/util_file.c
@@ -450,7 +450,8 @@ void *map_file(char *fname, size_t size)
#endif
if (!p) {
p = file_load(fname, &s2);
- if (!p || (s2 != 0 && s2 != size)) {
+ if (!p) return NULL;
+ if (s2 != size) {
DEBUG(1,("incorrect size for %s - got %d expected %d\n",
fname, s2, size));
if (p) free(p);