Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/citrus memset() after null check
details: https://anonhg.NetBSD.org/src/rev/bbdfbfa43c97
branches: trunk
changeset: 548469:bbdfbfa43c97
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Jun 27 08:56:07 2003 +0000
description:
memset() after null check
diffstat:
lib/libc/citrus/citrus_db_factory.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 749a305c6cc6 -r bbdfbfa43c97 lib/libc/citrus/citrus_db_factory.c
--- a/lib/libc/citrus/citrus_db_factory.c Fri Jun 27 08:50:50 2003 +0000
+++ b/lib/libc/citrus/citrus_db_factory.c Fri Jun 27 08:56:07 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_db_factory.c,v 1.2 2003/06/27 08:50:47 itojun Exp $ */
+/* $NetBSD: citrus_db_factory.c,v 1.3 2003/06/27 08:56:07 itojun Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_db_factory.c,v 1.2 2003/06/27 08:50:47 itojun Exp $");
+__RCSID("$NetBSD: citrus_db_factory.c,v 1.3 2003/06/27 08:56:07 itojun Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -281,9 +281,9 @@
}
/* allocate hash table */
depp = malloc(sizeof(*depp) * df->df_num_entries);
- memset(depp, 0, sizeof(*depp) * df->df_num_entries);
if (depp == NULL)
return -1;
+ memset(depp, 0, sizeof(*depp) * df->df_num_entries);
for (i = 0; i < df->df_num_entries; i++)
*depp = NULL;
Home |
Main Index |
Thread Index |
Old Index