projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace numerous instances of xzalloc with XZALLOC
[pspp]
/
src
/
data
/
mdd-writer.c
diff --git
a/src/data/mdd-writer.c
b/src/data/mdd-writer.c
index 495be8cafea8c1127eab718bec0209eee6110936..10728e8cbdf988b0181990b0338808465b8a0005 100644
(file)
--- a/
src/data/mdd-writer.c
+++ b/
src/data/mdd-writer.c
@@
-148,8
+148,8
@@
all_variables (struct dictionary *dict)
size_t var_count = n_sets + string_set_count (&var_names);
/* Allocate an array of var_or_mrset pointers (initially null). */
size_t var_count = n_sets + string_set_count (&var_names);
/* Allocate an array of var_or_mrset pointers (initially null). */
- struct var_or_mrset *var_or_mrset_array
= xcalloc (
-
var_count, sizeof *var_or_mrset_array
);
+ struct var_or_mrset *var_or_mrset_array
+
= XCALLOC (var_count, struct var_or_mrset
);
/* Fill the array. */
struct string_set added_mrsets = STRING_SET_INITIALIZER (added_mrsets);
/* Fill the array. */
struct string_set added_mrsets = STRING_SET_INITIALIZER (added_mrsets);
@@
-288,7
+288,7
@@
write_value_label_value (xmlTextWriter *writer, const struct val_lab *vl,
const union value *value = val_lab_get_value (vl);
if (width)
{
const union value *value = val_lab_get_value (vl);
if (width)
{
- char *s = xmemdup0 (value
_str (value, width)
, width);
+ char *s = xmemdup0 (value
->s
, width);
xmlTextWriterWriteAttribute (writer, _xml ("value"), _xml (s));
free (s);
}
xmlTextWriterWriteAttribute (writer, _xml ("value"), _xml (s));
free (s);
}
@@
-448,7
+448,7
@@
bool
mdd_write (struct file_handle *fh, struct dictionary *dict,
const char *sav_name)
{
mdd_write (struct file_handle *fh, struct dictionary *dict,
const char *sav_name)
{
- struct mdd_writer *w =
xzalloc (sizeof *w
);
+ struct mdd_writer *w =
XZALLOC (struct mdd_writer
);
size_t n_vars = dict_get_var_cnt (dict);
/* Open file handle as an exclusive writer. */
size_t n_vars = dict_get_var_cnt (dict);
/* Open file handle as an exclusive writer. */