[multiple] copy small struct instead of memcpy()

when patching config
personal/stbuehler/ci-build
Glenn Strauss 3 years ago
parent 31d9495330
commit cc2134c88b

@ -45,7 +45,8 @@ static void mod_access_merge_config(plugin_config * const pconf, const config_pl
}
static void mod_access_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_access_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -41,7 +41,8 @@ static void mod_alias_merge_config(plugin_config * const pconf, const config_plu
}
static void mod_alias_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_alias_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -383,7 +383,8 @@ static void mod_auth_merge_config(plugin_config * const pconf, const config_plug
}
static void mod_auth_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_auth_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -114,7 +114,8 @@ static void mod_authn_file_merge_config(plugin_config * const pconf, const confi
}
static void mod_authn_file_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_authn_file_merge_config(&p->conf,

@ -90,7 +90,8 @@ static void mod_authn_gssapi_merge_config(plugin_config * const pconf, const con
}
static void mod_authn_gssapi_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_authn_gssapi_merge_config(&p->conf,

@ -63,7 +63,8 @@ static void mod_authn_pam_merge_config(plugin_config * const pconf, const config
}
static void mod_authn_pam_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_authn_pam_merge_config(&p->conf,

@ -88,7 +88,8 @@ static void mod_authn_sasl_merge_config(plugin_config * const pconf, const confi
}
static void mod_authn_sasl_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_authn_sasl_merge_config(&p->conf,

@ -179,7 +179,8 @@ static void mod_cgi_merge_config(plugin_config * const pconf, const config_plugi
}
static void mod_cgi_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_cgi_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -65,7 +65,8 @@ static void mod_evasive_merge_config(plugin_config * const pconf, const config_p
}
static void mod_evasive_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_evasive_merge_config(&p->conf,p->cvlist + p->cvlist[i].v.u2[0]);

@ -151,7 +151,8 @@ static void mod_evhost_merge_config(plugin_config * const pconf, const config_pl
}
static void mod_evhost_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_evhost_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -185,7 +185,8 @@ static void mod_expire_merge_config(plugin_config * const pconf, const config_pl
}
static void mod_expire_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_expire_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -43,7 +43,8 @@ static void mod_flv_streaming_merge_config(plugin_config * const pconf, const co
}
static void mod_flv_streaming_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_flv_streaming_merge_config(&p->conf,

@ -142,7 +142,8 @@ static void mod_geoip_merge_config(plugin_config * const pconf, const config_plu
}
static void mod_geoip_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_geoip_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -48,7 +48,8 @@ static void mod_indexfile_merge_config(plugin_config * const pconf, const config
}
static void mod_indexfile_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_indexfile_merge_config(&p->conf,p->cvlist+p->cvlist[i].v.u2[0]);

@ -71,7 +71,8 @@ static void mod_magnet_merge_config(plugin_config * const pconf, const config_pl
}
static void mod_magnet_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_magnet_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -260,7 +260,8 @@ mod_maxmind_patch_config (connection * const con,
const plugin_data * const p,
plugin_config * const pconf)
{
memcpy(pconf, &p->defaults, sizeof(plugin_config));
*pconf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(pconf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_maxminddb_merge_config(pconf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -120,7 +120,8 @@ static void mod_mysql_vhost_merge_config(plugin_config * const pconf, const conf
}
static void mod_mysql_vhost_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_mysql_vhost_merge_config(&p->conf,

@ -67,7 +67,8 @@ static void mod_redirect_merge_config(plugin_config * const pconf, const config_
}
static void mod_redirect_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_redirect_merge_config(&p->conf, p->cvlist+p->cvlist[i].v.u2[0]);

@ -85,7 +85,8 @@ static void mod_rewrite_merge_config(plugin_config * const pconf, const config_p
}
static void mod_rewrite_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_rewrite_merge_config(&p->conf, p->cvlist+p->cvlist[i].v.u2[0]);

@ -152,7 +152,8 @@ static void mod_rrd_merge_config(plugin_config * const pconf, const config_plugi
}
static void mod_rrd_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_rrd_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -62,7 +62,8 @@ static void mod_simple_vhost_merge_config(plugin_config * const pconf, const con
}
static void mod_simple_vhost_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_simple_vhost_merge_config(&p->conf,

@ -78,7 +78,8 @@ static void mod_skeleton_merge_config(plugin_config * const pconf, const config_
}
static void mod_skeleton_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_skeleton_merge_config(&p->conf, p->cvlist+p->cvlist[i].v.u2[0]);

@ -56,7 +56,8 @@ static void mod_staticfile_merge_config(plugin_config * const pconf, const confi
}
static void mod_staticfile_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_staticfile_merge_config(&p->conf,

@ -75,7 +75,8 @@ static void mod_status_merge_config(plugin_config * const pconf, const config_pl
}
static void mod_status_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_status_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -147,7 +147,8 @@ static void mod_uploadprogress_merge_config(plugin_config * const pconf, const c
}
static void mod_uploadprogress_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_uploadprogress_merge_config(&p->conf,

@ -56,7 +56,8 @@ static void mod_usertrack_merge_config(plugin_config * const pconf, const config
}
static void mod_usertrack_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_usertrack_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);

@ -269,7 +269,8 @@ static void mod_vhostdb_merge_config(plugin_config * const pconf, const config_p
}
static void mod_vhostdb_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_vhostdb_merge_config(&p->conf,p->cvlist + p->cvlist[i].v.u2[0]);

@ -496,7 +496,8 @@ static void mod_vhostdb_merge_config(plugin_config * const pconf, const config_p
}
static void mod_vhostdb_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_vhostdb_merge_config(&p->conf,p->cvlist + p->cvlist[i].v.u2[0]);

@ -230,7 +230,8 @@ static void mod_vhostdb_merge_config(plugin_config * const pconf, const config_p
}
static void mod_vhostdb_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_vhostdb_merge_config(&p->conf,p->cvlist + p->cvlist[i].v.u2[0]);

@ -208,7 +208,8 @@ static void mod_vhostdb_merge_config(plugin_config * const pconf, const config_p
}
static void mod_vhostdb_patch_config(connection * const con, plugin_data * const p) {
memcpy(&p->conf, &p->defaults, sizeof(plugin_config));
p->conf = p->defaults; /* copy small struct instead of memcpy() */
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
for (int i = 1, used = p->nconfig; i < used; ++i) {
if (config_check_cond(con, (uint32_t)p->cvlist[i].k_id))
mod_vhostdb_merge_config(&p->conf,p->cvlist + p->cvlist[i].v.u2[0]);

Loading…
Cancel
Save