summaryrefslogtreecommitdiff
path: root/mmap/unix
diff options
context:
space:
mode:
authorCliff Woolley <jwoolley@apache.org>2003-07-14 00:38:17 +0000
committerCliff Woolley <jwoolley@apache.org>2003-07-14 00:38:17 +0000
commitf5aaa545896a22d85e5aed0891389f12fd65a050 (patch)
tree5bd16cf180b4957155ed14ccd38a02a0879eec9c /mmap/unix
parent182c8bc36223cab4bed84570c1105d567c465a2e (diff)
downloadapr-f5aaa545896a22d85e5aed0891389f12fd65a050.tar.gz
it's confusing as hell to get an allocated object back that's all zeros.
yeah, yeah, we returned something other than APR_SUCCESS, but still. anyway, the win32 implementation already does this, so now we're consistent. Submitted by: Sander, Branko, Cliff git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64568 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'mmap/unix')
-rw-r--r--mmap/unix/mmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mmap/unix/mmap.c b/mmap/unix/mmap.c
index 42d39caf3..28f0f8b3b 100644
--- a/mmap/unix/mmap.c
+++ b/mmap/unix/mmap.c
@@ -143,6 +143,7 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new,
if (aid < B_NO_ERROR) {
/* we failed to get an area we can use... */
+ *new = NULL;
return APR_ENOMEM;
}
@@ -163,6 +164,7 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new,
if (mm == (void *)-1) {
/* we failed to get an mmap'd file... */
+ *new = NULL;
return errno;
}
#endif