From c1bcddd803d2e33e5145ad585c4873d27207aeca Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 13 Mar 2006 23:58:58 +0000 Subject: 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) --- source3/client/client.c | 14 +++++++------- 1 file 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); } } -- cgit