From 0317e64dc83f9b0b3999d2c98df67608e4fa960e Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Wed, 20 Aug 2025 23:04:41 +0200 Subject: [PATCH] Remove double call to rig_token_lookup() and rot_token_lookup() The needed value is already in the variable. Test case /to check that the changes don't break the code): tests/rigctl --set-conf=rig_pathname=test,write_delay=1,timeout=2 --show-conf Q | grep --no-group-separator -A1 -E "(rig_pathname|^write_delay|^timeout):" tests/rotctl --set-conf=rot_pathname=test,write_delay=1,timeout=2 --show-conf Q | grep --no-group-separator -A1 -E "(rot_pathname|^write_delay|^timeout):" The output before and after this patch is: rig_pathname: "Path name to the device file of the rig" Default: /dev/rig, Value: test write_delay: "Delay in ms between each byte sent out" Default: 0, Value: 1 timeout: "Timeout in ms" Default: 0, Value: 2 Command 'Q' not found! rot_pathname: "Path name to the device file of the rotator" Default: /dev/rotator, Value: test write_delay: "Delay in ms between each byte sent out" Default: 0, Value: 1 timeout: "Timeout in ms" Default: 0, Value: 2 --- tests/rigctl_parse.c | 2 +- tests/rotctl_parse.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 44049b223..ad42193ec 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -6102,7 +6102,7 @@ declare_proto_rig(set_conf) } else { - ret = rig_set_conf(rig, rig_token_lookup(rig, arg1), arg2); + ret = rig_set_conf(rig, mytoken, arg2); } return (ret); diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index fa2c69f0a..bfc3488b7 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1738,7 +1738,7 @@ declare_proto_rot(set_conf) } else { - ret = rot_set_conf(rot, rot_token_lookup(rot, arg1), arg2); + ret = rot_set_conf(rot, mytoken, arg2); } return (ret);