Fixed error running 'make distcheck'
[pspp] / src / language / data-io / matrix-reader.c
index 963f4a24f152a1227955a5a58159bf196c730775..f1dbae184facb82ecd97826cdf465b03d0a252a7 100644 (file)
@@ -138,7 +138,7 @@ create_matrix_reader_from_case_reader (const struct dictionary *dict, struct cas
   if (vars)
     {
       int i;
-      *vars = xcalloc (sizeof (struct variable **), *n_vars);
+      *vars = xcalloc (*n_vars, sizeof (struct variable **));
 
       for (i = 0; i < *n_vars; ++i)
        {
@@ -213,14 +213,14 @@ next_matrix_from_reader (struct matrix_material *mm,
   mm->mean_matrix = mr->mean_vectors;
   mm->var_matrix = mr->var_vectors;
 
-  struct substring *var_names = xcalloc (n_vars, sizeof *var_names);
+  struct substring *var_names = XCALLOC (n_vars,  struct substring);
   for (int i = 0; i < n_vars; ++i)
     {
       ss_alloc_substring (var_names + i, ss_cstr (var_get_name (vars[i])));
     }
 
   struct ccase *c;
-  for ( ; (c = casereader_read (group) ); case_unref (c))
+  for (; (c = casereader_read (group)); case_unref (c))
     {
       const union value *uv = case_data (c, mr->rowtype);
       const char *row_type = CHAR_CAST (const char *, uv->s);