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
pull/1861/head
Daniele Forsi IU5HKX 2025-08-20 23:04:41 +02:00
rodzic 32d064d60b
commit 0317e64dc8
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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);

Wyświetl plik

@ -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);