[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pkg-shadow-commits
Subject:    [Pkg-shadow-commits] r2330 - in upstream/trunk: . libmisc
From:       nekral-guest () alioth ! debian ! org
Date:       2008-08-31 17:30:22
Message-ID: E1KZqko-0006km-Ek () alioth ! debian ! org
[Download RAW message or body]

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@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@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) {



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic