Hello,
2015-10-13 17:02 GMT+02:00 Denys Vlasenko :
> On Tue, Oct 13, 2015 at 3:09 PM, Jody Bruchon wrote:
>> This makes it sound like the whole OPT_FORCE/OPT_LAZY thing is unnecessary:
>> // MNT_FORCE and MNT_DETACH (from linux/fs.h) must match
>>
maybe that is a clever solution,
but it causes the code to be unreadable.
(read:no chance to understand before unterstanding
this typedef and its consequences)
just my 2 cents,
re,
wh
Am 05.10.2015 19:04, schrieb Denys Vlasenko:
> On Sat, Oct 3, 2015 at 12:58 PM, Xabier Oneca -- xOneca
>
I agree. There is no good reason for doing this at all. It looks like someone
has intentionally obfuscated the code. If it's for throwing an error on invalid
configurations, other constructs exist that are much more clear and are better
supported.
This is arguably a prime example of a poor
On Tue, Oct 13, 2015 at 1:00 PM, Jody Bruchon wrote:
> I agree. There is no good reason for doing this at all. It looks like someone
> has intentionally obfuscated the code. If it's for throwing an error on
> invalid configurations, other constructs exist that are much
On 2015-10-13 08:42, Denys Vlasenko wrote:
> On Tue, Oct 13, 2015 at 1:00 PM, Jody Bruchon
wrote:
>> I agree. There is no good reason for doing this at all. It looks
like someone has intentionally obfuscated the code. If it's for throwing
an error on invalid
On October 13, 2015 11:02:45 AM EST, Denys Vlasenko
wrote:
is obvious you did not bother reading the code before coming up
>with criticism.
I apologize and withdraw my statements. I will say that a comment explaining
why that typedef exists would still be beneficial.
I committed several changes which adopt kernel-style BUILD_BUG_ON:
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
Need some analogue for declaration-level check.
BUILD_BUG_ON would not work here:
typedef struct svstatus_t {
uint64_t time_be64 PACKED;
On Tue, Oct 13, 2015 at 3:09 PM, Jody Bruchon wrote:
> On 2015-10-13 08:42, Denys Vlasenko wrote:
>> On Tue, Oct 13, 2015 at 1:00 PM, Jody Bruchon
>> wrote:
>>> I agree. There is no good reason for doing this at all. It looks like
>>> someone has
Some discussion on better encapsulations of the technique here:
http://stackoverflow.com/questions/174356/ways-to-assert-expressions-at-build-time-in-c
Sam
On Sat, Oct 3, 2015 at 11:58 AM, Xabier Oneca -- xOneca
wrote:
> Hello,
>
> Excuse my ignorance, but what does this
On Sat, Oct 3, 2015 at 12:58 PM, Xabier Oneca -- xOneca
wrote:
> Hello,
>
> Excuse my ignorance, but what does this typedef do?
>
> --
> {
> typedef char bug[
> (OPT_FORCE != MNT_FORCE || OPT_LAZY != MNT_DETACH) ? -1 : 1
> ];
>
Hello,
Excuse my ignorance, but what does this typedef do?
--
{
typedef char bug[
(OPT_FORCE != MNT_FORCE || OPT_LAZY != MNT_DETACH) ? -1 : 1
];
}
--
My understanding is that this snippet catches when those two constants
are
Applied, thanks!
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
12 matches
Mail list logo