str: Add function xstrdup_if_nonnull() and introduce many users.
[pspp] / src / language / stats / autorecode.c
index 91fffcf27a07158b8f78ffa9bc1833fb2e428aba..3b51928fc64e4633008d0cc24b5e484d3312d618 100644 (file)
@@ -245,7 +245,7 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds)
       spec->format = *var_get_print_format (src_vars[i]);
 
       const char *label = var_get_label (src_vars[i]);
-      spec->label = label ? xstrdup (label) : NULL;
+      spec->label = xstrdup_if_nonnull (label);
 
       if (group && i > 0)
         spec->items = arc->specs[0].items;