]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/commitdiff
srvmgr: update copy of the whole taskParams structure
authorSam Nelson <sam.nelson@ti.com>
Sat, 5 Oct 2019 13:28:01 +0000 (09:28 -0400)
committerSam Nelson <sam.nelson@ti.com>
Tue, 8 Oct 2019 19:50:39 +0000 (15:50 -0400)
No need to do caluculation of size using assumptions on structure
element

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
packages/ti/srvmgr/ServiceMgr.c

index b85cf28000d548d19a7ef402c3af4036b2e75eb9..08f2de9cd2e124177bf7fb3a5c1af560a1754a9c 100644 (file)
@@ -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
  * 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);
             /* Deal with the Task_Params to avoid IInstance mismatch */
             params = &st->params;
             Task_Params_init(params);
-            memcpy((Void *)(&params->arg0), &taskParams->arg0,
-                        sizeof(*params) - sizeof(Void *));
+            memcpy((Void *)(params), taskParams,
+                        sizeof(*params));
             params->instance->name = st->name;
 
             st->reserved = reserved;
             params->instance->name = st->name;
 
             st->reserved = reserved;