rsl: Properly initialize the cm structure with memset

abis_rsl.c:332:23: warning: 'memset' call operates on objects of type 'struct rsl_ie_chan_mode'
      while the size is based on a different type 'struct rsl_ie_chan_mode *'
      [-Wsizeof-pointer-memaccess]
        memset(cm, 0, sizeof(cm));
               ~~            ^~
abis_rsl.c:332:23: note: did you mean to dereference the argument to 'sizeof' (and multiply it
      by the number of elements)?
        memset(cm, 0, sizeof(cm));
                             ^~
1 warning generated.
This commit is contained in:
Holger Hans Peter Freyther 2013-03-09 17:50:10 +01:00
parent e972dba8dd
commit e1145cf0f9
1 changed files with 1 additions and 1 deletions

View File

@ -329,7 +329,7 @@ int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int dbm)
static int channel_mode_from_lchan(struct rsl_ie_chan_mode *cm,
struct gsm_lchan *lchan)
{
memset(cm, 0, sizeof(cm));
memset(cm, 0, sizeof(*cm));
/* FIXME: what to do with data calls ? */
if (lchan->ts->trx->bts->network->dtx_enabled)