[mod_vhostdb_ldap] fix inverted logic (coverity)

fix inverted logic identified by coverity

silence other coverity warnings
personal/stbuehler/mod-csrf
Glenn Strauss 2017-02-26 10:54:43 -05:00
parent ab077790f2
commit d569572112
3 changed files with 4 additions and 3 deletions

View File

@ -86,7 +86,7 @@ FREE_FUNC(mod_rrd_free) {
close(p->write_fd);
#ifdef HAVE_FORK
/* collect status */
waitpid(p->rrdtool_pid, &status, 0);
while (-1 == waitpid(p->rrdtool_pid, &status, 0) && errno == EINTR) ;
#endif
}

View File

@ -394,7 +394,7 @@ static int mod_vhostdb_ldap_query(server *srv, connection *con, void *p_d, buffe
return -1;
}
if (NULL == (vals = ldap_get_values_len(ld, first, dbconf->attr))) {
if (NULL != (vals = ldap_get_values_len(ld, first, dbconf->attr))) {
buffer_copy_string_len(docroot, vals[0]->bv_val, vals[0]->bv_len);
ldap_value_free_len(vals);
}

View File

@ -899,7 +899,8 @@ static int server_main (server * const srv, int argc, char **argv) {
}
case 'p': print_config = 1; break;
case 't': ++test_config; break;
case '1': oneshot_fd = dup(STDIN_FILENO); break;
case '1': if (0 == oneshot_fd) oneshot_fd = dup(STDIN_FILENO);
break;
case 'D': srv->srvconf.dont_daemonize = 1; break;
case 'v': show_version(); return 0;
case 'V': show_features(); return 0;