From 352faba7ee9a83b01b5965aaf5e666268f026e87 Mon Sep 17 00:00:00 2001 From: Michael Black Date: Sun, 12 Jan 2020 23:01:18 -0600 Subject: [PATCH] Fix cppcheck warning in icm710.c --- icmarine/icm710.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/icmarine/icm710.c b/icmarine/icm710.c index 77de007e4..077ea022a 100644 --- a/icmarine/icm710.c +++ b/icmarine/icm710.c @@ -276,15 +276,15 @@ int icm710_init(RIG *rig) priv_caps = (const struct icm710_priv_caps *) caps->priv; - priv = (struct icm710_priv_data *)calloc(1, sizeof(struct icm710_priv_data)); + rig->state.priv = (struct icm710_priv_data *)calloc(1, sizeof(struct icm710_priv_data)); - if (!priv) + if (!rig->state.priv) { /* whoops! memory shortage! */ return -RIG_ENOMEM; } - rig->state.priv = (void *)priv; + priv = rig->state.priv; priv->remote_id = priv_caps->default_remote_id; priv->split = RIG_SPLIT_OFF;