diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-07-19 06:34:16 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-07-19 06:34:16 +0000 |
commit | 389c2af51a1d58e377f9ad61d67a17c4c65c757d (patch) | |
tree | 39893bef443a443e6c52d2b7458b569c9ab05243 | |
parent | 6e7de88136fb7d45d2011dfabd77eee7f589ccaa (diff) |
xcalloc is unneeded here since i is always 0 and we always use the
memory after initializing it.
Initial diff from Igor Zinovik.
OK niallo and xsa.
-rw-r--r-- | usr.bin/cvs/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index 1a8f8eda862..f03edff71c1 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.112 2007/07/03 13:22:43 joris Exp $ */ +/* $OpenBSD: util.c,v 1.113 2007/07/19 06:34:15 ray Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> @@ -748,7 +748,7 @@ cvs_strsplit(char *str, const char *sep) cp = xstrdup(str); av = xmalloc(sizeof(*av)); av->str = cp; - av->argv = xcalloc(i + 1, sizeof(*(av->argv))); + av->argv = xmalloc(sizeof(*(av->argv))); while ((p = strsep(&cp, sep)) != NULL) { av->argv[i++] = p; |