From: Richard Mudgett Date: Tue, 5 Feb 2013 18:16:55 +0000 (+0000) Subject: Because the compiler can check types with a struct copy and memcpy() cannot. X-Git-Tag: 11.4.0-rc1~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=186f8f4a39e2561d99a4eebe12fba99b23541b23;p=thirdparty%2Fasterisk.git Because the compiler can check types with a struct copy and memcpy() cannot. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380856 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c index dfedffe978..c915b184c2 100644 --- a/apps/confbridge/conf_config_parser.c +++ b/apps/confbridge/conf_config_parser.c @@ -1355,7 +1355,7 @@ error: static void conf_user_profile_copy(struct user_profile *dst, struct user_profile *src) { - memcpy(dst, src, sizeof(*dst)); + *dst = *src; } const struct user_profile *conf_find_user_profile(struct ast_channel *chan, const char *user_profile_name, struct user_profile *result)