lkml.org 
[lkml]   [2002]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH][2.5] Single linked lists for Linux, overly complicated v2
Date
On Friday 27 September 2002 02:57, Zach Brown wrote:
> #define tslist_add(_head, _elem) \
> do { \
> BUG_ON(tslist_on_list(_head, _elem)); \
> (_elem)->_slist_next = (_head); \
> (_head) = (_elem); \
> } while(0)

This evaluates _head and _elem twice each, or three times if you count
the BUG_ON.

Smaller point: why bother obfuscating the parameter names? You will
need to do that for locals in macros but parameters should cause no
name conflicts.

--
Daniel
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.857 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site