diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-06-08 19:39:44 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-06-08 19:39:44 +0000 |
commit | c8b6d1e47277ed2dd0a19e9b4725b2d1a56468eb (patch) | |
tree | 21a26f64235e0d0231c3bae76f1af4afeb839036 /contrib/one-true-awk | |
parent | 17ce5a9b90ea641cf433857664ee6702b4152539 (diff) | |
download | src-c8b6d1e47277ed2dd0a19e9b4725b2d1a56468eb.tar.gz src-c8b6d1e47277ed2dd0a19e9b4725b2d1a56468eb.zip |
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=301691
Diffstat (limited to 'contrib/one-true-awk')
-rw-r--r-- | contrib/one-true-awk/tran.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/one-true-awk/tran.c b/contrib/one-true-awk/tran.c index 237295af0611..e364ebd81928 100644 --- a/contrib/one-true-awk/tran.c +++ b/contrib/one-true-awk/tran.c @@ -333,7 +333,7 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */ donefld = 0; /* mark $1... invalid */ donerec = 1; } - 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; |