X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=common%2Fstringbucket.c;h=7fd0bfa8abdd27d6e7c9c21068ea25502ee12f5a;hb=7361ed553c5ed2943ab0f84e33e4ee536b6296a0;hp=27c10238c496efd3262a04f1fbf574a61151a09e;hpb=c38b2e192d8de8ef38389cc8071881464fff99bb;p=blerg.git diff --git a/common/stringbucket.c b/common/stringbucket.c index 27c1023..7fd0bfa 100644 --- 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);