Browse Source

[multiple] calloc match ptr type (clang --analyze)

personal/stbuehler/fix-fdevent
Glenn Strauss 3 years ago
parent
commit
a929de7ae5
  1. 2
      src/mod_vhostdb_dbi.c
  2. 2
      src/mod_vhostdb_ldap.c
  3. 2
      src/mod_vhostdb_mysql.c
  4. 2
      src/mod_vhostdb_pgsql.c
  5. 2
      src/mod_wstunnel.c

2
src/mod_vhostdb_dbi.c

@ -259,7 +259,7 @@ SETDEFAULTS_FUNC(mod_vhostdb_set_defaults) {
{ NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
};
p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *));
p->config_storage = calloc(1, srv->config_context->used * sizeof(plugin_config *));
for (size_t i = 0; i < srv->config_context->used; ++i) {
data_config const *config = (data_config const*)srv->config_context->data[i];

2
src/mod_vhostdb_ldap.c

@ -484,7 +484,7 @@ SETDEFAULTS_FUNC(mod_vhostdb_set_defaults) {
{ NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
};
p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *));
p->config_storage = calloc(1, srv->config_context->used * sizeof(plugin_config *));
for (size_t i = 0; i < srv->config_context->used; ++i) {
data_config const *config = (data_config const*)srv->config_context->data[i];

2
src/mod_vhostdb_mysql.c

@ -223,7 +223,7 @@ SETDEFAULTS_FUNC(mod_vhostdb_set_defaults) {
{ NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
};
p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *));
p->config_storage = calloc(1, srv->config_context->used * sizeof(plugin_config *));
for (size_t i = 0; i < srv->config_context->used; ++i) {
data_config const *config = (data_config const*)srv->config_context->data[i];

2
src/mod_vhostdb_pgsql.c

@ -200,7 +200,7 @@ SETDEFAULTS_FUNC(mod_vhostdb_set_defaults) {
{ NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
};
p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *));
p->config_storage = calloc(1, srv->config_context->used * sizeof(plugin_config *));
for (size_t i = 0; i < srv->config_context->used; ++i) {
data_config const *config = (data_config const*)srv->config_context->data[i];

2
src/mod_wstunnel.c

@ -214,7 +214,7 @@ SETDEFAULTS_FUNC(mod_wstunnel_set_defaults) {
{ NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
};
p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *));
p->config_storage = calloc(1, srv->config_context->used * sizeof(plugin_config *));
force_assert(p->config_storage);
for (size_t i = 0; i < srv->config_context->used; ++i) {
array *ca = ((data_config *)(srv->config_context->data[i]))->value;

Loading…
Cancel
Save