summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-13 23:58:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:26 -0500
commitc1bcddd803d2e33e5145ad585c4873d27207aeca (patch)
tree61ea374dede4e980d42fd3cfa6d3ce945c4670a6
parentb5c2c5cd2579560eb8d608b3f63b628735ccf3ca (diff)
downloadsamba-c1bcddd803d2e33e5145ad585c4873d27207aeca.tar.gz
samba-c1bcddd803d2e33e5145ad585c4873d27207aeca.tar.bz2
samba-c1bcddd803d2e33e5145ad585c4873d27207aeca.zip
r14359: Try and fix Coverity #176 by making the pointer
aliasing clearer. This isn't a bug but a code clarification. Jeremy. (This used to be commit a3b8bee3ff8211d78f793877c877ccd2e15825dd)
-rw-r--r--source3/client/client.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 1d42fd2995..886af863e4 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1336,15 +1336,15 @@ static struct file_list {
Free a file_list structure.
****************************************************************************/
-static void free_file_list (struct file_list * list)
+static void free_file_list (struct file_list *list_head)
{
- struct file_list *tmp;
+ struct file_list *list, *next;
- while (list) {
- tmp = list;
- DLIST_REMOVE(list, list);
- SAFE_FREE(tmp->file_path);
- SAFE_FREE(tmp);
+ for (list = list_head; list; list = next) {
+ next = list->next;
+ DLIST_REMOVE(list_head, list);
+ SAFE_FREE(list->file_path);
+ SAFE_FREE(list);
}
}