virFileLinkPointsTo return non-zero value on fail. This value may be positive or negative, so check should be != 0. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: bddbda99df ("network: Introduce virnetworkobj") Signed-off-by: Anastasia Belova <abelova@xxxxxxxxxxxxx> --- src/conf/virnetworkobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c index 20ee8eb58a..47658986e8 100644 --- a/src/conf/virnetworkobj.c +++ b/src/conf/virnetworkobj.c @@ -945,7 +945,7 @@ virNetworkLoadConfig(virNetworkObjList *nets, if ((autostartLink = virNetworkConfigFile(autostartDir, name)) == NULL) return NULL; - if ((autostart = virFileLinkPointsTo(autostartLink, configFile)) < 0) + if ((autostart = virFileLinkPointsTo(autostartLink, configFile)) != 0) return NULL; if (!(def = virNetworkDefParse(NULL, configFile, xmlopt, false))) -- 2.30.2 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx