summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorchl <chl@openbsd.org>2007-11-06 10:14:53 +0000
committerchl <chl@openbsd.org>2007-11-06 10:14:53 +0000
commit9f2b734fdd705c3e47711c44981908630f59c607 (patch)
tree7680fe413f926caaace6efcdae4ef2ab2ad8c76d /lib/libc
parentprevent segv on wrong sort name; Mark Lumsden. (diff)
downloadwireguard-openbsd-9f2b734fdd705c3e47711c44981908630f59c607.tar.xz
wireguard-openbsd-9f2b734fdd705c3e47711c44981908630f59c607.zip
malloc/memset -> calloc
ok ray@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/fts.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
index 94527c01a10..1e069783ac4 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fts.c,v 1.39 2007/11/02 20:32:57 millert Exp $ */
+/* $OpenBSD: fts.c,v 1.40 2007/11/06 10:14:53 chl Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -81,9 +81,8 @@ fts_open(char * const *argv, int options,
}
/* Allocate/initialize the stream */
- if ((sp = malloc(sizeof(FTS))) == NULL)
+ if ((sp = calloc(1, sizeof(FTS))) == NULL)
return (NULL);
- memset(sp, 0, sizeof(FTS));
sp->fts_compar = compar;
sp->fts_options = options;