From: Sam Nelson Date: Sat, 5 Oct 2019 13:28:01 +0000 (-0400) Subject: srvmgr: update copy of the whole taskParams structure X-Git-Tag: 3.50.04.07A~37 X-Git-Url: https://git.ti.com/gitweb?p=ipc%2Fipcdev.git;a=commitdiff_plain;h=fc68e02a90cb0f90025ea26d2825f77626e95d5a;hp=3425373ec2e79ef1b0ece3890f9b4549673dec0e srvmgr: update copy of the whole taskParams structure No need to do caluculation of size using assumptions on structure element Signed-off-by: Sam Nelson --- diff --git a/packages/ti/srvmgr/ServiceMgr.c b/packages/ti/srvmgr/ServiceMgr.c index b85cf28..08f2de9 100644 --- a/packages/ti/srvmgr/ServiceMgr.c +++ b/packages/ti/srvmgr/ServiceMgr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013, Texas Instruments Incorporated + * Copyright (c) 2011-2019, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -151,8 +151,8 @@ Bool ServiceMgr_registerSrvTask(UInt16 reserved, Task_FuncPtr func, /* Deal with the Task_Params to avoid IInstance mismatch */ params = &st->params; Task_Params_init(params); - memcpy((Void *)(¶ms->arg0), &taskParams->arg0, - sizeof(*params) - sizeof(Void *)); + memcpy((Void *)(params), taskParams, + sizeof(*params)); params->instance->name = st->name; st->reserved = reserved;