[libvirt] PATCH: 5/5: Make all code use virExec
Jim Meyering
jim at meyering.net
Fri Aug 29 07:14:48 UTC 2008
"Daniel P. Berrange" <berrange at redhat.com> wrote:
...
>> +/* Like virFileReadLimFP, but use a file descriptor rather than a FILE*. */
>> +int __virFileReadLimFD(int fd_arg, int maxlen, char **buf)
>> +{
>> + int fd = dup (fd_arg);
>> + if (0 <= fd) {
>
> Can we stick to 'fd >= 0' or 'fd < 0' or 'fd == -1'. I find
> the reversed constant-first conditionals rather painful to read.
> Always have to stop and think about them for too long.
Sure. I've just adjusted it like this:
- if (0 <= fd) {
+ if (fd >= 0) {
More information about the libvir-list
mailing list