summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/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/rcs/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/rcs/rcs.c')
-rw-r--r--usr.bin/rcs/rcs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/rcs/rcs.c b/usr.bin/rcs/rcs.c
index 549aeb9f407..b26c19c1801 100644
--- a/usr.bin/rcs/rcs.c
+++ b/usr.bin/rcs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.37 2007/05/17 03:33:24 ray Exp $ */
+/* $OpenBSD: rcs.c,v 1.38 2007/05/29 00:19:10 ray Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -2532,11 +2532,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;
}