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
/
data
/
format.c
diff --git
a/src/data/format.c
b/src/data/format.c
index a25e08f62b4d381e7b9490bc74ffe1dc27ebec85..a4c52b788ebd811541b9e3ac7d0e25beab016d81 100644
(file)
--- a/
src/data/format.c
+++ b/
src/data/format.c
@@
-1157,7
+1157,7
@@
static struct fmt_affix
fmt_affix_clone (const struct fmt_affix *old)
{
return (struct fmt_affix) {
- .s =
old->s ? xstrdup (old->s) : NULL
,
+ .s =
xstrdup_if_nonnull (old->s)
,
.width = old->width,
};
}