This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2]: Refactor relocate_path to also check if the relocated file/directory exists
On Sat, 22 Sep 2012 18:06:43 +0200, Khoo Yit Phang wrote:
> > 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.
[...]
> + if (stat (path, &s) != 0 || (isdir != !!S_ISDIR (s.st_mode)))
Sorry but it is not about what you like (*) but what has been concluded as
acceptable for the GDB codebase to keep it (possibly) easily contributable.
(*) I also use such constructs in my own code. This is irrelevant here.
Thanks,
Jan