From c7abfb4927bf7ededf673b957e79aad599af6edf Mon Sep 17 00:00:00 2001 From: Michael Black Date: Wed, 25 Mar 2020 17:43:55 -0500 Subject: [PATCH] Fix adat.c 'rigctl -m 29001 -u' error --- rigs/adat/adat.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/rigs/adat/adat.c b/rigs/adat/adat.c index 5b0e01c2b..346d4cf63 100644 --- a/rigs/adat/adat.c +++ b/rigs/adat/adat.c @@ -2636,7 +2636,7 @@ adat_priv_data_ptr adat_new_priv_data(RIG *pRig) { // Init Priv Data - pRig->state.priv = (adat_priv_data_ptr) calloc(sizeof(adat_priv_data_t), 1); + pPriv = pRig->state.priv = (adat_priv_data_ptr) calloc(sizeof(adat_priv_data_t), 1); if (pRig->state.priv != NULL) { @@ -2768,11 +2768,7 @@ int adat_init(RIG *pRig) // Check Params - if (pRig == NULL) - { - nRC = -RIG_EARG; - } - else + if (pRig != NULL) { adat_priv_data_ptr pPriv = NULL;