[Pkg-shadow-commits] r2330 - in upstream/trunk: . libmisc
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sun Aug 31 17:30:22 UTC 2008
Author: nekral-guest
Date: 2008-08-31 17:30:21 +0000 (Sun, 31 Aug 2008)
New Revision: 2330
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/list.c
Log:
* libmisc/list.c: Added assertions for non NULL parameters.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-08-31 17:30:12 UTC (rev 2329)
+++ upstream/trunk/ChangeLog 2008-08-31 17:30:21 UTC (rev 2330)
@@ -1,6 +1,7 @@
2008-08-29 Nicolas François <nicolas.francois at centraliens.net>
* libmisc/list.c: Remove historical comment.
+ * libmisc/list.c: Added assertions for non NULL parameters.
2008-08-29 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/libmisc/list.c
===================================================================
--- upstream/trunk/libmisc/list.c 2008-08-31 17:30:12 UTC (rev 2329)
+++ upstream/trunk/libmisc/list.c 2008-08-31 17:30:21 UTC (rev 2330)
@@ -49,6 +49,7 @@
char **tmp;
assert (NULL != member);
+ assert (NULL != list);
/*
* Scan the list for the new name. Return the original list
@@ -98,6 +99,7 @@
char **tmp;
assert (NULL != member);
+ assert (NULL != list);
/*
* Scan the list for the old name. Return the original list
@@ -144,6 +146,8 @@
int i;
char **tmp;
+ assert (NULL != list);
+
for (i = 0; NULL != list[i]; i++);
tmp = (char **) xmalloc ((i + 1) * sizeof (char *));
@@ -162,6 +166,7 @@
bool is_on_list (char *const *list, const char *member)
{
assert (NULL != member);
+ assert (NULL != list);
while (NULL != *list) {
if (strcmp (*list, member) == 0) {
More information about the Pkg-shadow-commits
mailing list