str: Add function xstrdup_if_nonnull() and introduce many users.
[pspp] / src / output / text-item.c
index 7bcf2aa10d67f8f72cf19fb23d9ed7c0f620d505..a0428acc82c44209e3c91d16e98ebb2a6a34a8c2 100644 (file)
@@ -75,7 +75,7 @@ text_item_create (enum text_item_type type, const char *text,
                   const char *label)
 {
   return text_item_create_nocopy (type, xstrdup (text),
-                                  label ? xstrdup (label) : NULL);
+                                  xstrdup_if_nonnull (label));
 }
 
 /* Creates and returns a new text item containing VALUE, TYPE, and LABEL.