Use XCALLOC / XZALLOC macros where reasonable
[pspp] / src / ui / gui / psppire-import-textfile.c
index 5ef83fcd2a3e63e216c870446df3a67c029d84fe..d9dcccef2868d11b8d76e475b6ecf38655fe776d 100644 (file)
@@ -88,7 +88,7 @@ choose_likely_separators (PsppireImportAssistant *ia)
       gchar *line_text = NULL;
       gtk_tree_model_get (GTK_TREE_MODEL (ia->text_file), &iter, 1, &line_text, -1);
 
-      gint *counts = xzalloc (sizeof *counts * SEPARATOR_CNT);
+      gint *counts = XCALLOC (SEPARATOR_CNT, gint);
 
       struct substring cs = ss_cstr (line_text);
       for (;
@@ -120,7 +120,7 @@ choose_likely_separators (PsppireImportAssistant *ia)
 
              if (cn == NULL)
                {
-                 struct separator_count_node *new_cn = xzalloc (sizeof *new_cn);
+                 struct separator_count_node *new_cn = XZALLOC (struct separator_count_node);
                  new_cn->occurance = counts[j];
                  new_cn->quantity = 1;
                  hmap_insert (&count_map[j], &new_cn->node, hash);