summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/buf.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/buf.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/buf.c')
-rw-r--r--usr.bin/cvs/buf.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/cvs/buf.c b/usr.bin/cvs/buf.c
index a7d316c7ebc..acc0c1e5765 100644
--- a/usr.bin/cvs/buf.c
+++ b/usr.bin/cvs/buf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buf.c,v 1.60 2007/02/22 06:42:09 otto Exp $ */
+/* $OpenBSD: buf.c,v 1.61 2007/05/29 00:19:10 ray Exp $ */
/*
* Copyright (c) 2003 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -367,10 +367,7 @@ cvs_buf_write_stmp(BUF *b, char *template, struct timeval *tv)
static void
cvs_buf_grow(BUF *b, size_t len)
{
- void *tmp;
-
- tmp = xrealloc(b->cb_buf, 1, b->cb_size + len);
- b->cb_buf = tmp;
+ b->cb_buf = xrealloc(b->cb_buf, 1, b->cb_size + len);
b->cb_size += len;
}