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.
struct text_item *item = xzalloc (sizeof *item);
*item = (struct text_item) {
.output_item = OUTPUT_ITEM_INITIALIZER (&text_item_class),
+ .output_item.command_name = xstrdup_if_nonnull (output_get_command_name ()),
.output_item.label = label,
.type = type,
.text = value,