Browse Source

[mod_vhostdb_ldap] fix inverted logic (coverity)

fix inverted logic identified by coverity

silence other coverity warnings
personal/stbuehler/mod-csrf
Glenn Strauss 4 years ago
parent
commit
d569572112
  1. 2
      src/mod_rrdtool.c
  2. 2
      src/mod_vhostdb_ldap.c
  3. 3
      src/server.c

2
src/mod_rrdtool.c

@ -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
}

2
src/mod_vhostdb_ldap.c

@ -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);
}

3
src/server.c

@ -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;

Loading…
Cancel
Save