summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcs.c
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2007-05-29 00:19:11 +0000
committerRay Lai <ray@cvs.openbsd.org>2007-05-29 00:19:11 +0000
commitc5f0f50dae49c13e66ed1ad97606a14435d0c1d9 (patch)
tree14a0fe05a641971be935db072bd71113510f8361 /usr.bin/cvs/rcs.c
parent04f22301b1591dc3ad7bd6d58fc5515fbe615cab (diff)
Since xrealloc dies on failure it is safe to directly assign to the
original pointer. Theo agrees, and so does the rest of the tree (ssh, etc. all do this already). Saves a bunch of variables and assignments. OK niallo@
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r--usr.bin/cvs/rcs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index b0e57cb7065..ebdcad29a2a 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.211 2007/05/26 20:58:36 niallo Exp $ */
+/* $OpenBSD: rcs.c,v 1.212 2007/05/29 00:19:10 ray Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -2359,11 +2359,10 @@ rcs_pushtok(RCSFILE *rfp, const char *tok, int type)
static void
rcs_growbuf(RCSFILE *rf)
{
- void *tmp;
struct rcs_pdata *pdp = (struct rcs_pdata *)rf->rf_pdata;
- tmp = xrealloc(pdp->rp_buf, 1, pdp->rp_blen + RCS_BUFEXTSIZE);
- pdp->rp_buf = tmp;
+ pdp->rp_buf = xrealloc(pdp->rp_buf, 1,
+ pdp->rp_blen + RCS_BUFEXTSIZE);
pdp->rp_blen += RCS_BUFEXTSIZE;
pdp->rp_bufend = pdp->rp_buf + pdp->rp_blen - 1;
}