Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 9 Jun 2002 08:01:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 9 Jun 2002 08:01:22 -0400 Received: from www.deepbluesolutions.co.uk ([212.18.232.186]:48390 "EHLO caramon.arm.linux.org.uk") by vger.kernel.org with ESMTP id ; Sun, 9 Jun 2002 08:01:22 -0400 Date: Sun, 9 Jun 2002 13:01:15 +0100 From: Russell King To: Lightweight patch manager Cc: Linux Kernel Mailing List , Linus Torvalds Subject: Re: [PATCH][2.5] introduce list_move macros Message-ID: <20020609130115.A22462@flint.arm.linux.org.uk> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 09, 2002 at 05:09:54AM -0600, Lightweight patch manager wrote: > +/** > + * list_move - move a list entry from a right after b > + * @list the entry to move > + * @head the entry to move after > + */ > +#define list_move(list,head) \ > + list_del(list); \ > + list_add(list,head) Yuck. What if someone does: if (foo) list_move(list,head); -- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/