Re: [libvirt] [PATCH python] Avoid implicit treatment of an arithmetic result as a boolean

2017-09-26 Thread Pavel Hrdina
On Tue, Sep 26, 2017 at 11:15:36AM +0100, Daniel P. Berrange wrote: > Latest GCC versions are unhappy with us treating an integer > arithmetic result as a boolean: > > libvirt-utils.c: In function ‘virReallocN’: > libvirt-utils.c:111:23: warning: ‘*’ in boolean context, suggest ‘&&’ instead > [-W

[libvirt] [PATCH python] Avoid implicit treatment of an arithmetic result as a boolean

2017-09-26 Thread Daniel P. Berrange
Latest GCC versions are unhappy with us treating an integer arithmetic result as a boolean: libvirt-utils.c: In function ‘virReallocN’: libvirt-utils.c:111:23: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context] if (!tmp && (size * count)) { ~~^