Re: [PATCH 1/2]: Refactor relocate_path to also check if the relocated file/directory exists

Andreas Schwab
2012-09-21T19:09:29Z

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.

Andreas.

--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."