On 08/02/2011 03:06 PM, Eric Blake wrote:
Detected by Coverity. We want to compare the result of fnmatch 'rv', not our pre-set return value 'ret'. * src/rpc/virnetsaslcontext.c (virNetSASLContextCheckIdentity): Check correct variable. --- src/rpc/virnetsaslcontext.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/rpc/virnetsaslcontext.c b/src/rpc/virnetsaslcontext.c index a0752dd..ef36e2c 100644 --- a/src/rpc/virnetsaslcontext.c +++ b/src/rpc/virnetsaslcontext.c @@ -130,11 +130,11 @@ int virNetSASLContextCheckIdentity(virNetSASLContextPtr ctxt, int rv = fnmatch (*wildcards, identity, 0); if (rv == 0) { ret = 1; goto cleanup; /* Succesful match */ } - if (ret != FNM_NOMATCH) { + if (rv != FNM_NOMATCH) { virNetError(VIR_ERR_INTERNAL_ERROR, _("Malformed TLS whitelist regular expression '%s'"), *wildcards); goto cleanup; }
ACK. -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list