summaryrefslogtreecommitdiffstats
path: root/contrib/one-true-awk/tran.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2007-10-25 12:38:02 +0000
committerobrien <obrien@FreeBSD.org>2007-10-25 12:38:02 +0000
commit9227abab1db8112427f5c46511a467cb8d6467d4 (patch)
tree4802d08923bb0ee17354898d227a094db941cabf /contrib/one-true-awk/tran.c
parentd187e809f9751c4d3f4b00ef5abc4e8e90c816f0 (diff)
downloadFreeBSD-src-9227abab1db8112427f5c46511a467cb8d6467d4.zip
FreeBSD-src-9227abab1db8112427f5c46511a467cb8d6467d4.tar.gz
Vendor import of bwk's 23-Oct-2007 release.
This includes fixes for FreeBSD PR's: bin/104795, bin/100443
Diffstat (limited to 'contrib/one-true-awk/tran.c')
-rw-r--r--contrib/one-true-awk/tran.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/one-true-awk/tran.c b/contrib/one-true-awk/tran.c
index d8b4a47..c19ce94 100644
--- a/contrib/one-true-awk/tran.c
+++ b/contrib/one-true-awk/tran.c
@@ -332,10 +332,10 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */
donerec = 1;
}
t = tostring(s); /* in case it's self-assign */
- vp->tval &= ~NUM;
- vp->tval |= STR;
if (freeable(vp))
xfree(vp->sval);
+ vp->tval &= ~NUM;
+ vp->tval |= STR;
vp->tval &= ~DONTFREE;
dprintf( ("setsval %p: %s = \"%s (%p) \", t=%o r,f=%d,%d\n",
vp, NN(vp->nval), t,t, vp->tval, donerec, donefld) );
OpenPOWER on IntegriCloud