projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
str: Add function xstrdup_if_nonnull() and introduce many users.
[pspp]
/
src
/
output
/
text-item.c
diff --git
a/src/output/text-item.c
b/src/output/text-item.c
index 7bcf2aa10d67f8f72cf19fb23d9ed7c0f620d505..a0428acc82c44209e3c91d16e98ebb2a6a34a8c2 100644
(file)
--- a/
src/output/text-item.c
+++ b/
src/output/text-item.c
@@
-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.