[Groonga-commit] groonga/groonga at 86a1b06 [master] grn_ts: fix a bug of grn_ts_buf

Back to archive index

susumu.yata null+****@clear*****
Tue Sep 8 18:34:02 JST 2015


susumu.yata	2015-09-08 18:34:02 +0900 (Tue, 08 Sep 2015)

  New Revision: 86a1b0645844d8de442c5f4a12e5975bdb0fb376
  https://github.com/groonga/groonga/commit/86a1b0645844d8de442c5f4a12e5975bdb0fb376

  Message:
    grn_ts: fix a bug of grn_ts_buf
    
    GitHub: #394

  Modified files:
    lib/ts.c

  Modified: lib/ts.c (+1 -1)
===================================================================
--- lib/ts.c    2015-09-08 18:01:00 +0900 (fca36f1)
+++ lib/ts.c    2015-09-08 18:34:02 +0900 (f6d68f1)
@@ -93,7 +93,7 @@ grn_ts_buf_reserve(grn_ctx *ctx, grn_ts_buf *buf, size_t new_size) {
   if (new_size <= buf->size) {
     return GRN_SUCCESS;
   }
-  enough_size = new_size ? new_size : 1;
+  enough_size = buf->size ? (buf->size << 1) : 1;
   while (enough_size < new_size) {
     enough_size <<= 1;
   }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index