summaryrefslogtreecommitdiffstats
path: root/media/libeffects/factory
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-02-20 12:16:30 -0800
committerGlenn Kasten <gkasten@google.com>2012-07-17 11:35:16 -0700
commita189a6883ee55cf62da1d7bf5bf5a8ab501938a4 (patch)
tree7ab4133c0ce507e289baacf76d745de27f9e8136 /media/libeffects/factory
parent28b76b334f92a15a2be3cc9e2f7d229a3275d1ac (diff)
downloadframeworks_av-a189a6883ee55cf62da1d7bf5bf5a8ab501938a4.zip
frameworks_av-a189a6883ee55cf62da1d7bf5bf5a8ab501938a4.tar.gz
frameworks_av-a189a6883ee55cf62da1d7bf5bf5a8ab501938a4.tar.bz2
Use struct assignment instead of explicit memcpy
for POD structs effect_descriptor_t and effect_config_t Change-Id: Ib2fc47f85fb65ed91b0abb1f87217c49b5eb571d
Diffstat (limited to 'media/libeffects/factory')
-rw-r--r--media/libeffects/factory/EffectsFactory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libeffects/factory/EffectsFactory.c b/media/libeffects/factory/EffectsFactory.c
index 59cd9e3..f158929 100644
--- a/media/libeffects/factory/EffectsFactory.c
+++ b/media/libeffects/factory/EffectsFactory.c
@@ -214,7 +214,7 @@ int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor)
while (gCurLib) {
if (gCurEffect) {
if (index == gCurEffectIdx) {
- memcpy(pDescriptor, gCurEffect->object, sizeof(effect_descriptor_t));
+ *pDescriptor = *(effect_descriptor_t *)gCurEffect->object;
ret = 0;
break;
} else {
@@ -251,7 +251,7 @@ int EffectGetDescriptor(const effect_uuid_t *uuid, effect_descriptor_t *pDescrip
pthread_mutex_lock(&gLibLock);
ret = findEffect(NULL, uuid, &l, &d);
if (ret == 0) {
- memcpy(pDescriptor, d, sizeof(effect_descriptor_t));
+ *pDescriptor = *d;
}
pthread_mutex_unlock(&gLibLock);
return ret;