"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