lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <60d29d630801020522r737ea96cl7693567298d28aca@mail.gmail.com>
Date:	Wed, 2 Jan 2008 14:22:08 +0100
From:	Abdel <draconux@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Re: macro _set_base - "do - while(0)" question

2008/1/2, DervishD <lkml@...vishd.net>:

>    * Abdel <draconux@...il.com> dixit:
>    > In file include/asm-i386/system.h,  _set_base and _set_limit use an
>    > useless do ... while(0)
>    >
>    > Why is this needed ?
>
>    Google for "do while swallow semicolon". This looks like an useless and
>    weird construction but it is very useful when it comes to macros (you
>    can define variables inside the block and you can use your macro as any
>    other statement, it won't swallow the semicolon).


thanks to all for your responses :)

-- 
Abdel
http://draconux.free.fr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ