You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2012/11/10 18:21:43 UTC
svn commit: r1407853 - /httpd/httpd/trunk/modules/aaa/mod_authz_dbd.c
Author: jailletc36
Date: Sat Nov 10 17:21:42 2012
New Revision: 1407853
URL: http://svn.apache.org/viewvc?rev=1407853&view=rev
Log:
cppCheck: Suspicious condition.
AFAIK, there is no actual problem with the existing code. 'rv' would only not have the 'expected' value, but the execution
path would remain the same.
However, the patched code is more logical. We put the returned value in 'rv', then test it against 0.
Modified:
httpd/httpd/trunk/modules/aaa/mod_authz_dbd.c
Modified: httpd/httpd/trunk/modules/aaa/mod_authz_dbd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authz_dbd.c?rev=1407853&r1=1407852&r2=1407853&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authz_dbd.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authz_dbd.c Sat Nov 10 17:21:42 2012
@@ -163,7 +163,7 @@ static int authz_dbd_login(request_rec *
/* OK, this is non-critical; we can just not-redirect */
}
else if ((rv = apr_dbd_pvselect(dbd->driver, r->pool, dbd->handle,
- &res, query, 0, r->user, NULL) == 0)) {
+ &res, query, 0, r->user, NULL)) == 0) {
for (rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1);
rv != -1;
rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1)) {