Kouhei Sutou
null+****@clear*****
Sat Apr 18 15:49:20 JST 2015
Kouhei Sutou 2015-04-18 15:49:20 +0900 (Sat, 18 Apr 2015) New Revision: 20ee392230d80c7f421f3fda484963d5b6eaec7c https://github.com/groonga/groonga/commit/20ee392230d80c7f421f3fda484963d5b6eaec7c Message: Fix error report about open() open() sets errno. Modified files: lib/ii.c lib/io.c Modified: lib/ii.c (+1 -1) =================================================================== --- lib/ii.c 2015-04-18 15:13:58 +0900 (c21b92f) +++ lib/ii.c 2015-04-18 15:49:20 +0900 (0ef5d78) @@ -7799,7 +7799,7 @@ grn_ii_buffer_commit(grn_ctx *ctx, grn_ii_buffer *ii_buffer) ii_buffer->tmpfd = GRN_OPEN(ii_buffer->tmpfpath, O_RDONLY); #endif /* WIN32 */ if (ii_buffer->tmpfd == -1) { - SERR("oepn"); + ERRNO_ERR("oepn"); return ctx->rc; } { Modified: lib/io.c (+5 -2) =================================================================== --- lib/io.c 2015-04-18 15:13:58 +0900 (3820e4b) +++ lib/io.c 2015-04-18 15:49:20 +0900 (6c45768) @@ -495,7 +495,7 @@ grn_io_detect_type(grn_ctx *ctx, const char *path) } grn_close(fd); } else { - SERR(path); + ERRNO_ERR(path); } return res; } @@ -513,7 +513,10 @@ grn_io_open(grn_ctx *ctx, const char *path, grn_io_mode mode) { struct _grn_io_header h; int fd = GRN_OPEN(path, O_RDWR | O_BINARY); - if (fd == -1) { SERR(path); return NULL; } + if (fd == -1) { + ERRNO_ERR(path); + return NULL; + } if (fstat(fd, &s) != -1 && s.st_size >= sizeof(struct _grn_io_header)) { if (grn_read(fd, &h, sizeof(struct _grn_io_header)) == sizeof(struct _grn_io_header)) { if (!memcmp(h.idstr, GRN_IO_IDSTR, 16)) { -------------- next part -------------- HTML����������������������������...다운로드