[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. dee097366dfb7b3cbd95f
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-07-04 04:06:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via dee097366dfb7b3cbd95f847225b9e1cf0e9c15a (commit) from 3d7ddc7e034d636b99afb5efec51f586117aed0a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dee097366dfb7b3cbd95f847225b9e1cf0e9c15a Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 22:32:14 2020 -0500 Fix cppcheck warnings diff --git a/dummy/netampctl.c b/dummy/netampctl.c index cca93ac1..7d1a66c0 100644 --- a/dummy/netampctl.c +++ b/dummy/netampctl.c @@ -106,15 +106,19 @@ static int netampctl_open(AMP *amp) { ret = read_string(&->state.ampport, buf, BUF_MAX, "\n", sizeof("\n")); - if (ret <= 0) + if (ret > 0) { - return (ret < 0) ? ret : -RIG_EPROTO; + rig_debug(RIG_DEBUG_VERBOSE, "%s called, string=%s\n", __func__, buf); } - - rig_debug(RIG_DEBUG_VERBOSE, "%s called, string=%s\n", __func__, buf); } while (ret > 0); + if (ret < 0) + { + return -RIG_EPROTO; + } + + return RIG_OK; } ----------------------------------------------------------------------- Summary of changes: dummy/netampctl.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |