From 51d4473ef0610fe85ad545ff00aba833e4d1429f Mon Sep 17 00:00:00 2001 From: Wouter van Gulik Date: Sat, 21 Aug 2021 20:30:03 +0200 Subject: [PATCH] newcat.c: Drop width check; the only call site (get_mode) uses it before the call. Besides most other rigs assume it is != NULL. So having width == NULL would cause a crash for all other rigs. --- rigs/yaesu/newcat.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index bc63e96c5..851f70b5a 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -10080,16 +10080,13 @@ rmode_t newcat_rmode_width(RIG *rig, vfo_t vfo, char mode, pbwidth_t *width) ENTERFUNC; - if (width != NULL) - { - *width = RIG_PASSBAND_NORMAL; - } + *width = RIG_PASSBAND_NORMAL; for (i = 0; i < sizeof(newcat_mode_conv) / sizeof(newcat_mode_conv[0]); i++) { if (newcat_mode_conv[i].modechar == mode) { - if (newcat_mode_conv[i].chk_width == TRUE && width != NULL) + if (newcat_mode_conv[i].chk_width == TRUE) { if (newcat_is_rig(rig, RIG_MODEL_FT991) && mode == 'E') // crude fix because 991 hangs on NA0; command while in C4FM