stk: Fix sizeof on memcpy

src/stk.c: In function ‘__ofono_cbs_sim_download’:
src/stk.c:283:45: error: argument to ‘sizeof’ in ‘memcpy’ call is the
same expression as the source; did you mean to dereference it?
[-Werror=sizeof-pointer-memaccess]
  memcpy(&e.cbs_pp_download.page, msg, sizeof(msg));
                                               ^
This commit is contained in:
Lucas De Marchi 2013-05-22 20:01:47 -03:00 committed by Denis Kenzior
parent 1c75edf59a
commit 874a9ee285
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ void __ofono_cbs_sim_download(struct ofono_stk *stk, const struct cbs *msg)
e.type = STK_ENVELOPE_TYPE_CBS_PP_DOWNLOAD;
e.src = STK_DEVICE_IDENTITY_TYPE_NETWORK;
memcpy(&e.cbs_pp_download.page, msg, sizeof(msg));
memcpy(&e.cbs_pp_download.page, msg, sizeof(*msg));
err = stk_send_envelope(stk, &e, stk_cbs_download_cb,
ENVELOPE_RETRIES_DEFAULT);