[Groonga-commit] groonga/groonga at 8618ac4 [master] Use GRN_PLUGIN_MALLOCN

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Apr 10 15:14:12 JST 2016


Kouhei Sutou	2016-04-10 15:14:12 +0900 (Sun, 10 Apr 2016)

  New Revision: 8618ac4f0a1620098ceaad5ba43c49f1f45fec0c
  https://github.com/groonga/groonga/commit/8618ac4f0a1620098ceaad5ba43c49f1f45fec0c

  Message:
    Use GRN_PLUGIN_MALLOCN

  Modified files:
    lib/proc/proc_select.c

  Modified: lib/proc/proc_select.c (+2 -2)
===================================================================
--- lib/proc/proc_select.c    2016-04-10 15:13:50 +0900 (6400838)
+++ lib/proc/proc_select.c    2016-04-10 15:14:12 +0900 (392f1e5)
@@ -540,7 +540,7 @@ grn_select_drilldowns(grn_ctx *ctx, grn_obj *table,
   if (!labels) {
     return;
   }
-  visits = GRN_PLUGIN_MALLOC(ctx, n_drilldowns * sizeof(drilldown_info_status));
+  visits = GRN_PLUGIN_MALLOCN(ctx, drilldown_info_status, n_drilldowns);
 
   drilldown_info_tsort_init(ctx, labels, visits, drilldowns, n_drilldowns);
   GRN_UINT32_INIT(&tsorted_ids, GRN_OBJ_VECTOR);
@@ -550,7 +550,7 @@ grn_select_drilldowns(grn_ctx *ctx, grn_obj *table,
     goto exit;
   }
 
-  results = GRN_PLUGIN_MALLOC(ctx, n_drilldowns * sizeof(grn_table_group_result));
+  results = GRN_PLUGIN_MALLOCN(ctx, grn_table_group_result, n_drilldowns);
 
   /* TODO: Remove invalid key drilldowns from the count. */
   for (i = 0; i < n_drilldowns; i++) {
-------------- next part --------------
HTML����������������������������...
Télécharger 



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