diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2007-11-06 10:14:54 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2007-11-06 10:14:54 +0000 |
commit | a14390fe9e9ae5805f69dc9a0d6c2455744d8234 (patch) | |
tree | 0a0f62f52de914aaea9447e4a6761c6a1371ff41 /lib/libc/gen | |
parent | e9fb25b1ec50cf5157f9c49417c5bf9266b5fafc (diff) |
malloc/memset -> calloc
ok ray@
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/fts.c | 5 |
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; |