summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-19 23:40:37 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-19 23:41:14 -0700
commitad99aa119875151b182c6e3d463d3c297ae3d56b (patch)
tree351af314373592e5b15fc94438119ebfd5dfac9c
parent94731abadcd06995c28f140aaffde456a7750807 (diff)
Rename new_list variable to not shadow new_list function
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] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--list.c10
1 files 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;
}