mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
maint: Fix incorrect parenthesis placement causing true/false assignment
There were a few places in our code where the following pattern in 'if'
condition occurred:
if ((foo = bar() < 0))
do something;
This patch adjusts the conditions to the expected format:
if ((foo = bar()) < 0)
do something;
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1488192
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
@@ -424,7 +424,7 @@ void testTLSWriteCertChain(const char *filename,
|
||||
|
||||
for (i = 0; i < ncerts; i++) {
|
||||
size = sizeof(buffer);
|
||||
if ((err = gnutls_x509_crt_export(certs[i], GNUTLS_X509_FMT_PEM, buffer, &size) < 0)) {
|
||||
if ((err = gnutls_x509_crt_export(certs[i], GNUTLS_X509_FMT_PEM, buffer, &size)) < 0) {
|
||||
VIR_WARN("Failed to export certificate %s", gnutls_strerror(err));
|
||||
unlink(filename);
|
||||
abort();
|
||||
|
||||
Reference in New Issue
Block a user