aboutsummaryrefslogtreecommitdiff
path: root/contrib/one-true-awk
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2019-06-02 20:47:15 +0000
committerWarner Losh <imp@FreeBSD.org>2019-06-02 20:47:15 +0000
commit2675e1b91dcfa744a414a42f5522f4fed958476c (patch)
treebbcd54107f00125df3f3df6ca239c636dd50900e /contrib/one-true-awk
parente9b659753c07b539df17441012b0bfa5ebdbe0ea (diff)
downloadsrc-2675e1b91dcfa744a414a42f5522f4fed958476c.tar.gz
src-2675e1b91dcfa744a414a42f5522f4fed958476c.zip
Reapply r301691:
Revert r301689 - one-true-awk: Avoid a NULL dereference. I got this wrong and the coverity report doesn't match the NetBSD change, which was thought for a different version. The change wouldn't hurt but let's wait until upstream figures this out.
Notes
Notes: svn path=/head/; revision=348518
Diffstat (limited to 'contrib/one-true-awk')
-rw-r--r--contrib/one-true-awk/tran.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/one-true-awk/tran.c b/contrib/one-true-awk/tran.c
index 8577a0b11d31..837f3742bc4f 100644
--- a/contrib/one-true-awk/tran.c
+++ b/contrib/one-true-awk/tran.c
@@ -366,7 +366,7 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */
if (donerec == 0)
recbld();
}
- t = s ? tostring(s) : tostring(""); /* in case it's self-assign */
+ t = tostring(s); /* in case it's self-assign */
if (freeable(vp))
xfree(vp->sval);
vp->tval &= ~(NUM|CONVC|CONVO);