From aa0c94260e006b949fc511c9e675153e2d609641 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 19 Jul 2013 23:40:37 -0700 Subject: [PATCH] Rename new_list variable to not shadow new_list function MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Silences gcc warning: list.c: In function ‘dup_list_head’: list.c:104:14: warning: declaration of ‘new_list’ shadows a global declaration [-Wshadow] list.c:80:10: warning: shadowed declaration is here [-Wshadow] Change-Id: Icd36196f63a565918e10864e866bd8c9f636d28a Signed-off-by: Alan Coopersmith --- list.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/list.c b/list.c index c1caff6..55f50f1 100644 --- a/list.c +++ b/list.c @@ -101,16 +101,16 @@ list_ptr new_list (void) -------------------------------------------------------------------- **/ list_ptr dup_list_head(list_ptr lp, int start_at_curr) { - list_ptr new_list; + list_ptr new_listp; - if ((new_list = (list_ptr) malloc( sizeof( list_item))) == NULL) { + if ((new_listp = (list_ptr) malloc( sizeof( list_item))) == NULL) { return (list_ptr)NULL; } - new_list->next = start_at_curr ? lp->ptr.curr : lp->next; - new_list->ptr.curr = lp->ptr.curr; + new_listp->next = start_at_curr ? lp->ptr.curr : lp->next; + new_listp->ptr.curr = lp->ptr.curr; - return new_list; + return new_listp; } -- 2.7.4