lkml.org 
[lkml]   [2012]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC 1/3] typecheck: extend typecheck.h with more useful typechecking macros
On Sat, Apr 14, 2012 at 3:14 PM, Sasha Levin <levinsasha928@gmail.com> wrote:
> +#define typecheck2(type,x,y)           \
> +({     typecheck(type, x);             \
> +       typecheck(type, y);             \
> +       1;                              \
> +})

This seems silly.

Since typecheck() is already a nice expression returning 1, there's no
reason to do *another* level of statement expressions. So it would be
just

#define typecheck2(type,x,y) \
(typecheck(type, x), typecheck(type, y))

instead.

Which makes me suspect you don't really need that whole typecheck2 etc
macro set at all.

Linus
--
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: 2012-04-14 23:15    [W:0.333 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site