projects
/
blerg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
626be60
)
MAP_FAILED, not NULL!
author
Chip Black
<bytex64@bytex64.net>
Wed, 2 Jul 2014 04:29:15 +0000
(23:29 -0500)
committer
Chip Black
<bytex64@bytex64.net>
Wed, 2 Jul 2014 04:29:41 +0000
(23:29 -0500)
common/stringbucket.c
patch
|
blob
|
history
diff --git
a/common/stringbucket.c
b/common/stringbucket.c
index
27c1023
..
7fd0bfa
100644
(file)
--- a/
common/stringbucket.c
+++ b/
common/stringbucket.c
@@
-40,7
+40,7
@@
struct stringbucket * stringbucket_open(const char *filename) {
flock(obj->fd, LOCK_UN);
obj->size = st.st_size;
obj->list = mmap(NULL, obj->size, PROT_READ | PROT_WRITE, MAP_SHARED, obj->fd, 0);
- if (obj->list ==
NULL
) {
+ if (obj->list ==
MAP_FAILED
) {
perror("stringbucket mmap");
close(obj->fd);
free(obj);