- dst_var = dict_create_var_assert (default_dict, dv->z_name, 0);
- if (dv->v->label)
- {
- dst_var->label = xmalloc (strlen (dv->v->label) + 12);
- cp = stpcpy (dst_var->label, _("Z-score of "));
- strcpy (cp, dv->v->label);
- }
- else
- {
- dst_var->label = xmalloc (strlen (dv->v->name) + 12);
- cp = stpcpy (dst_var->label, _("Z-score of "));
- strcpy (cp, dv->v->name);
- }
+ dst_var = dict_create_var_assert (dataset_dict (ds), dv->z_name, 0);
+ var_set_label (dst_var, xasprintf (_("Z-score of %s"),
+ var_to_string (dv->v)));