kopia lustrzana https://github.com/Hamlib/Hamlib
Fix cppcheck warning in ra37xx.c
rodzic
c5cc6db7b4
commit
a88c53b4ad
|
@ -224,15 +224,15 @@ int ra37xx_init(RIG *rig)
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv = (struct ra37xx_priv_data *)malloc(sizeof(struct ra37xx_priv_data));
|
rig->state.priv = (struct ra37xx_priv_data *)malloc(sizeof(struct ra37xx_priv_data));
|
||||||
|
|
||||||
if (!priv)
|
if (!rig->state.priv)
|
||||||
{
|
{
|
||||||
/* whoops! memory shortage! */
|
/* whoops! memory shortage! */
|
||||||
return -RIG_ENOMEM;
|
return -RIG_ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
rig->state.priv = (void *)priv;
|
priv = rig->state.priv;
|
||||||
|
|
||||||
priv->receiver_id = -1;
|
priv->receiver_id = -1;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue