kopia lustrzana https://github.com/Hamlib/Hamlib
Fix cppcheck warning in ars.c
rodzic
fe8e66032a
commit
76027df392
|
@ -150,14 +150,16 @@ ars_init(ROT *rot)
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv = (struct ars_priv_data *)malloc(sizeof(struct ars_priv_data));
|
rot->state.priv = (struct ars_priv_data *)malloc(sizeof(struct ars_priv_data));
|
||||||
|
|
||||||
if (!priv)
|
if (!rot->state.priv)
|
||||||
{
|
{
|
||||||
/* whoops! memory shortage! */
|
/* whoops! memory shortage! */
|
||||||
return -RIG_ENOMEM;
|
return -RIG_ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv = rot->state.priv;
|
||||||
|
|
||||||
priv->pp_control = 0;
|
priv->pp_control = 0;
|
||||||
priv->pp_data = 0;
|
priv->pp_data = 0;
|
||||||
|
|
||||||
|
@ -167,8 +169,6 @@ ars_init(ROT *rot)
|
||||||
priv->brake_off = 0; /* i.e. brake is ON */
|
priv->brake_off = 0; /* i.e. brake is ON */
|
||||||
priv->curr_move = 0;
|
priv->curr_move = 0;
|
||||||
|
|
||||||
rot->state.priv = (void *)priv;
|
|
||||||
|
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue