Re: mc bug



On Thu, 8 Jan 2004, Dave Jones wrote:

> ./mc/mc-4.6.0/pc/util_nt.c:531
>
> buffer->st_mode &= !S_IXUSR & !S_IXGRP & !S_IXOTH;
>
> That looks odd to me. Is that going to do the desired effect?
> or should it be something more like..
>
> buffer->st_mode &= !(S_IXUSR | S_IXGRP | S_IXOTH);
>
> perhaps ?


With '!' both are nonsense, that should be '~' (bitwise negation instead
of logical negation).

These two are the same:

buffer->st_mode &= ~S_IXUSR & ~S_IXGRP & ~S_IXOTH;
buffer->st_mode &= ~(S_IXUSR | S_IXGRP | S_IXOTH);



-- 
Egmont




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]