projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
32e6467
)
fd: Allow passing NULL to para_munmap().
author
Andre Noll
<maan@systemlinux.org>
Tue, 26 Apr 2011 14:33:44 +0000
(16:33 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Tue, 26 Apr 2011 14:33:44 +0000
(16:33 +0200)
This patch makes para_munmap succeed with return value 0 if the passed
"start" pointer is NULL. This allows to simplify the code in the
callers a bit, similar to free(NULL).
fd.c
patch
|
blob
|
history
diff --git
a/fd.c
b/fd.c
index 6f9266f47a56cd8dee3e99b8651d12a89bb4069b..ea16bdda993aff814fa41684af53506e46242a4f 100644
(file)
--- a/
fd.c
+++ b/
fd.c
@@
-563,6
+563,9
@@
out:
int para_munmap(void *start, size_t length)
{
int err;
+
+ if (!start)
+ return 0;
if (munmap(start, length) >= 0)
return 1;
err = errno;