[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] PATCH: 5/5: Make all code use virExec
- From: Jim Meyering <jim meyering net>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] PATCH: 5/5: Make all code use virExec
- Date: Fri, 29 Aug 2008 09:14:48 +0200
"Daniel P. Berrange" <berrange 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) {
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]