Re: [libvirt] PATCH: 5/5: Make all code use virExec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> 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) {

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]