Kamil Dudka <[email protected]> writes: > On Monday 16 February 2009 15:24:21 Jim Meyering wrote: >> Please write this as: >> >> static bool >> extra_mode (mode_t mode) >> { >> return mode & ~S_IRWXUGO; >> } > Slightly changed to deal only with least significant 12bits: > static bool > extra_mode (mode_t input) > { > const mode_t mask = ~S_IRWXUGO & 0xFFF; > return input & mask; > }
Perhaps ~S_IFMT instead of 0xFFF? Andreas. -- Andreas Schwab, SuSE Labs, [email protected] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
