summaryrefslogtreecommitdiff
path: root/mmap
diff options
context:
space:
mode:
authorjwoolley <jwoolley@13f79535-47bb-0310-9956-ffa450edef68>2003-07-14 00:38:17 +0000
committerjwoolley <jwoolley@13f79535-47bb-0310-9956-ffa450edef68>2003-07-14 00:38:17 +0000
commite9cabce75143585e89a4e6a59ef047134a7009ad (patch)
tree5bd16cf180b4957155ed14ccd38a02a0879eec9c /mmap
parent524ac3812ba9cf75caa571628f7cc6d46a753821 (diff)
downloadlibapr-e9cabce75143585e89a4e6a59ef047134a7009ad.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: http://svn.apache.org/repos/asf/apr/apr/trunk@64568 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'mmap')
-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