From b7388e2fca4382232b71301cef3a625d74b6a2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A3=B0=E7=BA=B3?= <1595220980@qq.com> Date: Thu, 26 Jun 2025 09:21:05 +0800 Subject: [PATCH] Delete useless variables of pmr171 and q900 --- rigs/guohetec/pmr171.c | 4 +--- rigs/guohetec/q900.c | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/rigs/guohetec/pmr171.c b/rigs/guohetec/pmr171.c index 9c1e67990..c4baac155 100644 --- a/rigs/guohetec/pmr171.c +++ b/rigs/guohetec/pmr171.c @@ -349,7 +349,6 @@ static int pmr171_open(RIG *rig) { hamlib_port_t *rp = RIGPORT(rig); int retry = 5; - bool success = false; while (retry > 0) { rig_flush(rp); @@ -357,7 +356,6 @@ static int pmr171_open(RIG *rig) int r = read_block(rp, reply, rlen); if (r > 0) { - success = true; break; } @@ -365,7 +363,7 @@ static int pmr171_open(RIG *rig) hl_usleep(20 * 1000); } - return success ? RIG_OK : RIG_OK; + return RIG_OK; } static int pmr171_send_cmd1(RIG *rig, unsigned char cmd, unsigned char *reply) diff --git a/rigs/guohetec/q900.c b/rigs/guohetec/q900.c index 3ad165107..c6750b3f8 100644 --- a/rigs/guohetec/q900.c +++ b/rigs/guohetec/q900.c @@ -348,7 +348,6 @@ static int q900_open(RIG *rig) { hamlib_port_t *rp = RIGPORT(rig); int retry = 5; - bool success = false; while (retry > 0) { rig_flush(rp); @@ -356,7 +355,6 @@ static int q900_open(RIG *rig) int r = read_block(rp, reply, rlen); if (r > 0) { - success = true; break; }