Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'cb/compat-mmap-is-private-read-only'
author
Junio C Hamano
<gitster@pobox.com>
Tue, 30 Oct 2018 06:43:49 +0000
(15:43 +0900)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 30 Oct 2018 06:43:49 +0000
(15:43 +0900)
Code tightening.
* cb/compat-mmap-is-private-read-only:
compat: make sure git_mmap is not expected to write
compat/mmap.c
patch
|
blob
|
history
raw
(from parent 1:
87c15d1
)
diff --git
a/compat/mmap.c
b/compat/mmap.c
index 7f662fef7bcb408045eb1536afed058a607ae97b..14d31010dfe57e520c6864df4f84ea732018785f 100644
(file)
--- a/
compat/mmap.c
+++ b/
compat/mmap.c
@@
-4,7
+4,7
@@
void *git_mmap(void *start, size_t length, int prot, int flags, int fd, off_t of
{
size_t n = 0;
- if (start != NULL ||
!(flags & MAP_PRIVATE)
)
+ if (start != NULL ||
flags != MAP_PRIVATE || prot != PROT_READ
)
die("Invalid usage of mmap when built with NO_MMAP");
start = xmalloc(length);