kopia lustrzana https://github.com/Hamlib/Hamlib
Fix cppcheck warnings in ts7400.c
rodzic
616edd5cca
commit
49ce282c2f
|
@ -53,17 +53,18 @@ static int ts7400_rot_init(ROT *rot)
|
|||
{
|
||||
struct ts7400_rot_priv_data *priv;
|
||||
|
||||
priv = (struct ts7400_rot_priv_data *)
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
rot->state.priv = (struct ts7400_rot_priv_data *)
|
||||
malloc(sizeof(struct ts7400_rot_priv_data));
|
||||
|
||||
if (!priv)
|
||||
if (!rot->state.priv)
|
||||
{
|
||||
return -RIG_ENOMEM;
|
||||
}
|
||||
|
||||
rot->state.priv = (void *)priv;
|
||||
priv = rot->state.priv;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
rot->state.rotport.type.rig = RIG_PORT_NONE;
|
||||
|
||||
priv->az = priv->el = 0;
|
||||
|
|
Ładowanie…
Reference in New Issue