Merge branch 'rw/apply-does-not-take-ignore-date' into maint
[gitweb.git] / column.c
index 76b615db5f2a4ff7567a7d1d9d6514f838f15321..786abe62b0bb0f27b51218f7698c60476d12c8e8 100644 (file)
--- a/column.c
+++ b/column.c
@@ -81,8 +81,7 @@ static void compute_column_width(struct column_data *data)
  */
 static void shrink_columns(struct column_data *data)
 {
-       data->width = xrealloc(data->width,
-                              sizeof(*data->width) * data->cols);
+       REALLOC_ARRAY(data->width, data->cols);
        while (data->rows > 1) {
                int x, total_width, cols, rows;
                rows = data->rows;
@@ -91,8 +90,7 @@ static void shrink_columns(struct column_data *data)
                data->rows--;
                data->cols = DIV_ROUND_UP(data->list->nr, data->rows);
                if (data->cols != cols)
-                       data->width = xrealloc(data->width,
-                                              sizeof(*data->width) * data->cols);
+                       REALLOC_ARRAY(data->width, data->cols);
                compute_column_width(data);
 
                total_width = strlen(data->opts.indent);
@@ -376,7 +374,7 @@ int run_column_filter(int colopts, const struct column_options *opts)
        if (fd_out != -1)
                return -1;
 
-       memset(&column_process, 0, sizeof(column_process));
+       child_process_init(&column_process);
        argv = &column_process.args;
 
        argv_array_push(argv, "column");