Kouhei Sutou
null+****@clear*****
Wed May 16 10:37:37 JST 2018
Kouhei Sutou 2018-05-16 10:37:37 +0900 (Wed, 16 May 2018) New Revision: 629f2d2943075b5bef36b94e353b861d0d0a3f58 https://github.com/groonga/groonga/commit/629f2d2943075b5bef36b94e353b861d0d0a3f58 Message: Compare to 0 explicitly Modified files: lib/io.c Modified: lib/io.c (+3 -3) =================================================================== --- lib/io.c 2018-05-15 17:26:34 +0900 (fb432c78e) +++ lib/io.c 2018-05-16 10:37:37 +0900 (b3171c2e9) @@ -2156,13 +2156,13 @@ grn_munmap(grn_ctx *ctx, grn_ctx *owner_ctx, grn_io *io, fileinfo *fi, { int res; res = munmap(start, length); - if (res) { + if (res == 0) { + mmap_size -= length; + } else { SERR("munmap(%p,%" GRN_FMT_LLU ") failed <%" GRN_FMT_LLU ">", start, (unsigned long long int)length, (unsigned long long int)mmap_size); - } else { - mmap_size -= length; } return res; } -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180516/527e65bd/attachment-0001.htm