Use struct copy instead of memcpy().
authorRichard Mudgett <rmudgett@digium.com>
Tue, 13 Mar 2012 16:50:06 +0000 (16:50 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 13 Mar 2012 16:50:06 +0000 (16:50 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358858 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/format.c

index 3af0f15..8e9e3b9 100644 (file)
@@ -81,7 +81,7 @@ static int interface_hash_cb(const void *obj, const int flags)
 
 void ast_format_copy(struct ast_format *dst, const struct ast_format *src)
 {
-       memcpy(dst, src, sizeof(struct ast_format));
+       *dst = *src;
 }
 
 void ast_format_set_video_mark(struct ast_format *format)