#include "libpspp/cast.h"
#include "libpspp/compiler.h"
+#include "libpspp/str.h"
#include "output/driver.h"
#include "output/output-item-provider.h"
*item = (struct chart_item) {
.output_item = OUTPUT_ITEM_INITIALIZER (&chart_item_class),
.class = class,
- .title = title ? xstrdup (title) : NULL
+ .title = xstrdup_if_nonnull (title)
};
}
{
assert (!chart_item_is_shared (item));
free (item->title);
- item->title = title != NULL ? xstrdup (title) : NULL;
+ item->title = xstrdup_if_nonnull (title);
}
/* Submits ITEM to the configured output drivers, and transfers ownership to