[Groonga-commit] groonga/groonga at c5420b1 [master] Use grn_strncat()

Back to archive index

Kouhei Sutou null+****@clear*****
Fri May 6 18:27:56 JST 2016


Kouhei Sutou	2016-05-06 18:27:56 +0900 (Fri, 06 May 2016)

  New Revision: c5420b1120ad9a6d38c9cde8c5933618a43e98f8
  https://github.com/groonga/groonga/commit/c5420b1120ad9a6d38c9cde8c5933618a43e98f8

  Message:
    Use grn_strncat()

  Modified files:
    lib/proc/proc_snippet.c

  Modified: lib/proc/proc_snippet.c (+5 -1)
===================================================================
--- lib/proc/proc_snippet.c    2016-05-06 18:27:50 +0900 (bdf5767)
+++ lib/proc/proc_snippet.c    2016-05-06 18:27:56 +0900 (f98438d)
@@ -69,8 +69,12 @@ snippet_exec(grn_ctx *ctx, grn_obj *snip, grn_obj *text,
                              GRN_TEXT_VALUE(&snippet_buffer) + prefix_length,
                              &snippet_length);
     if (rc == GRN_SUCCESS) {
+      grn_strncat(GRN_TEXT_VALUE(&snippet_buffer),
+                  GRN_BULK_WSIZE(&snippet_buffer),
+                  suffix,
+                  suffix_length);
       grn_vector_add_element(ctx, snippets,
-                             strncat(GRN_TEXT_VALUE(&snippet_buffer), suffix, suffix_length),
+                             GRN_TEXT_VALUE(&snippet_buffer),
                              prefix_length + snippet_length + suffix_length,
                              0, GRN_DB_SHORT_TEXT);
     }
-------------- next part --------------
HTML����������������������������...
Descargar 



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