This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, On Sep 21, 2012, at 3:09 PM, Andreas Schwab wrote: > Jan Kratochvil <jan.kratochvil@redhat.com> writes: > >> It would have to be written as: >> if (stat (path, &s) != 0 || !isdir != !S_ISDIR (s.st_mode)) > > A common idiom is to use !! when the other side is already boolean. I like this idiom, it does seem to be used in GDB, and isdir should be a boolean. Here's a patch that uses it. Yit September 22, 2012
Attachment:
refactor-relocate-path.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |