diff options
author | 2006-04-05 01:38:55 +0000 | |
---|---|---|
committer | 2006-04-05 01:38:55 +0000 | |
commit | 3b4c5c25821bd1bd0865b7b0cdf20c9c1163373c (patch) | |
tree | 646ef8b493f8d6bb92577891c01d3ed66d64c83c /usr.bin/cvs/entries.c | |
parent | PowerBook3,3 has tumbler (diff) | |
download | wireguard-openbsd-3b4c5c25821bd1bd0865b7b0cdf20c9c1163373c.tar.xz wireguard-openbsd-3b4c5c25821bd1bd0865b7b0cdf20c9c1163373c.zip |
Use variable names for sizeof, remove casts in front of xmalloc,
use xcalloc and xstrdup where appropriate, and other stuff.
OK joris@
Diffstat (limited to 'usr.bin/cvs/entries.c')
-rw-r--r-- | usr.bin/cvs/entries.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/cvs/entries.c b/usr.bin/cvs/entries.c index 50527233645..7219dc7befd 100644 --- a/usr.bin/cvs/entries.c +++ b/usr.bin/cvs/entries.c @@ -1,4 +1,4 @@ -/* $OpenBSD: entries.c,v 1.54 2006/01/02 08:11:56 xsa Exp $ */ +/* $OpenBSD: entries.c,v 1.55 2006/04/05 01:38:55 ray Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -105,8 +105,7 @@ cvs_ent_open(const char *dir, int flags) return (NULL); } - ep = (CVSENTRIES *)xmalloc(sizeof(CVSENTRIES)); - memset(ep, 0, sizeof(*ep)); + ep = xcalloc(1, sizeof(*ep)); ep->cef_path = xstrdup(entpath); ep->cef_bpath = xstrdup(bpath); @@ -380,8 +379,7 @@ cvs_ent_parse(const char *entry) return (NULL); } - ent = (struct cvs_ent *)xmalloc(sizeof(*ent)); - memset(ent, 0, sizeof(*ent)); + ent = xcalloc(1, sizeof(*ent)); ent->ce_buf = buf; if (*fields[0] == '\0') |