X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=src%2Fpfm-write.c;h=c3562f34c437b594ca16f99c48b14ff4915f80ef;hb=012b055f5f7b4ddd2a608e64c53eaae101b5634e;hp=cd088b7b85048be501fbd2ccbec3c45b316ddcee;hpb=c9e2bf6cb988f8c00d89ccf191a28388cccbd868;p=pspp diff --git a/src/pfm-write.c b/src/pfm-write.c index cd088b7b85..c3562f34c4 100644 --- a/src/pfm-write.c +++ b/src/pfm-write.c @@ -129,7 +129,7 @@ pfm_open_writer (struct file_handle *fh, struct dictionary *dict, w->vars = NULL; w->var_cnt = dict_get_var_cnt (dict); - w->vars = xmalloc (sizeof *w->vars * w->var_cnt); + w->vars = xnmalloc (w->var_cnt, sizeof *w->vars); for (i = 0; i < w->var_cnt; i++) { const struct variable *dv = dict_get_var (dict, i); @@ -246,7 +246,7 @@ write_header (struct pfm_writer *w) { /* PORTME: Translation table from SPSS character code to this computer's native character code (which is probably ASCII). */ - static const unsigned char spss2ascii[256] = + static const char spss2ascii[256] = { "0000000000000000000000000000000000000000000000000000000000000000" "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ."