diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-07-19 06:37:59 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-07-19 06:37:59 +0000 |
commit | d2969bd61a83d3472bb74d12a512c175d2be1191 (patch) | |
tree | d96cd8a45097bfcf895d8ff1ea5fb412fd2fffe2 | |
parent | 389c2af51a1d58e377f9ad61d67a17c4c65c757d (diff) |
Sync with cvs:
> 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/rcs/rcsutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/rcs/rcsutil.c b/usr.bin/rcs/rcsutil.c index 2dff77b1d21..9e3177773cb 100644 --- a/usr.bin/rcs/rcsutil.c +++ b/usr.bin/rcs/rcsutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsutil.c,v 1.30 2007/05/29 00:19:10 ray Exp $ */ +/* $OpenBSD: rcsutil.c,v 1.31 2007/07/19 06:37:58 ray Exp $ */ /* * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -600,7 +600,7 @@ rcs_strsplit(const 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; |