kopia lustrzana https://github.com/Hamlib/Hamlib
Fix cppcheck warnings in wj.c
rodzic
47376d9004
commit
ae1777f6e7
6
wj/wj.c
6
wj/wj.c
|
@ -216,15 +216,15 @@ int wj_init(RIG *rig)
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv = (struct wj_priv_data *)malloc(sizeof(struct wj_priv_data));
|
rig->state.priv = (struct wj_priv_data *)malloc(sizeof(struct wj_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 = 0;
|
priv->receiver_id = 0;
|
||||||
priv->freq = kHz(500);
|
priv->freq = kHz(500);
|
||||||
|
|
Ładowanie…
Reference in New Issue