From patchwork Sat Feb 28 00:53:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 23847 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id AEBC1DDED8 for ; Sat, 28 Feb 2009 12:01:55 +1100 (EST) X-Original-To: cbe-oss-dev@ozlabs.org Delivered-To: cbe-oss-dev@ozlabs.org Received: from hera.kernel.org (hera.kernel.org [140.211.167.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4DEA6DDE00; Sat, 28 Feb 2009 11:59:35 +1100 (EST) Received: from hera.kernel.org (IDENT:U2FsdGVkX18R76Gch2r8C9h82r9bmTZN6kQR1rtlenY@localhost [127.0.0.1]) by hera.kernel.org (8.14.2/8.14.2) with ESMTP id n1S0xR3N016657 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Feb 2009 00:59:27 GMT Received: (from geoff@localhost) by hera.kernel.org (8.14.2/8.13.1/Submit) id n1S0xRLw016656; Sat, 28 Feb 2009 00:59:27 GMT Message-Id: <20090228005350.381392551@am.sony.com> References: <20090228005350.203477145@am.sony.com> In-reply-to: <20090228005350.203477145@am.sony.com> User-Agent: quilt/0.46-1 Date: Fri, 27 Feb 2009 16:53:53 -0800 From: Geoff Levand To: Jeremy Kerr Content-Disposition: inline; filename=list-no-new.diff X-Virus-Scanned: ClamAV 0.93.3/9055/Fri Feb 27 20:16:01 2009 on hera.kernel.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hera.kernel.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Sat, 28 Feb 2009 00:59:29 +0000 (UTC) Cc: cbe-oss-dev@ozlabs.org Subject: [Cbe-oss-dev] [patch 03/16] petitboot: Rename symbol new X-BeenThere: cbe-oss-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Discussion about Open Source Software for the Cell Broadband Engine List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Change the symbol 'new' to an alternative. The symbol new is reserved for C++ compilers. Signed-off-by: Geoff Levand --- lib/list/list.c | 20 ++++++++++---------- lib/list/list.h | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) --- a/lib/list/list.c +++ b/lib/list/list.c @@ -7,20 +7,20 @@ void list_init(struct list *list) list->head.prev = &list->head; } -void list_insert_before(struct list_item *next, struct list_item *new) +void list_insert_before(struct list_item *next, struct list_item *item) { - new->next = next; - new->prev = next->prev; - next->prev->next = new; - next->prev = new; + item->next = next; + item->prev = next->prev; + next->prev->next = item; + next->prev = item; } -void list_insert_after(struct list_item *prev, struct list_item *new) +void list_insert_after(struct list_item *prev, struct list_item *item) { - new->next = prev->next; - new->prev = prev; - prev->next->prev = new; - prev->next = new; + item->next = prev->next; + item->prev = prev; + prev->next->prev = item; + prev->next = item; } void list_remove(struct list_item *item) --- a/lib/list/list.h +++ b/lib/list/list.h @@ -35,17 +35,17 @@ struct list { _pos = list_entry(_pos->_member.next, typeof(*_pos), _member)) void list_init(struct list *list); -void list_insert_before(struct list_item *next, struct list_item *new); -void list_insert_after(struct list_item *prev, struct list_item *new); +void list_insert_before(struct list_item *next, struct list_item *item); +void list_insert_after(struct list_item *prev, struct list_item *item); void list_remove(struct list_item *item); -static inline void list_add(struct list *list, struct list_item *new) +static inline void list_add(struct list *list, struct list_item *item) { - list_insert_after(&list->head, new); + list_insert_after(&list->head, item); } -static inline void list_add_tail(struct list *list, struct list_item *new) +static inline void list_add_tail(struct list *list, struct list_item *item) { - list_insert_before(&list->head, new); + list_insert_before(&list->head, item); } #endif /* _LIST_H */