diff options
author | 2007-02-21 04:09:54 +0000 | |
---|---|---|
committer | 2007-02-21 04:09:54 +0000 | |
commit | cb0400d79d69dfd5d31491837bb5a12eb6b40e61 (patch) | |
tree | 3b22860c4fda392ac1718b414f8adc888d6448d6 | |
parent | Some Sony VAIOs use the wrong eventing type. Work around that by honering it. (diff) | |
download | wireguard-openbsd-cb0400d79d69dfd5d31491837bb5a12eb6b40e61.tar.xz wireguard-openbsd-cb0400d79d69dfd5d31491837bb5a12eb6b40e61.zip |
Replace a manual xrealloc with rcsnum_setsize.
From Charles Longeau <chl at tuxfamily dot org>.
OK joris@.
-rw-r--r-- | usr.bin/cvs/rcsnum.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/cvs/rcsnum.c b/usr.bin/cvs/rcsnum.c index afa22b5918f..b62c90b806b 100644 --- a/usr.bin/cvs/rcsnum.c +++ b/usr.bin/cvs/rcsnum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsnum.c,v 1.40 2006/11/13 18:42:40 xsa Exp $ */ +/* $OpenBSD: rcsnum.c,v 1.41 2007/02/21 04:09:54 ray Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -150,16 +150,13 @@ void rcsnum_cpy(const RCSNUM *nsrc, RCSNUM *ndst, u_int depth) { u_int len; - void *tmp; len = nsrc->rn_len; if (depth != 0 && len > depth) len = depth; - tmp = xrealloc(ndst->rn_id, len, sizeof(*(nsrc->rn_id))); - ndst->rn_id = tmp; - ndst->rn_len = len; - /* Overflow checked in xrealloc(). */ + rcsnum_setsize(ndst, len); + /* Overflow checked in rcsnum_setsize(). */ (void)memcpy(ndst->rn_id, nsrc->rn_id, len * sizeof(*(nsrc->rn_id))); } |