From a575cb78b417a493bc2481df14e2c366ae8bb01a Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 17 Jul 2024 07:36:26 +0200 Subject: [PATCH] show ERRORs only if ERROR count > 0 --- hcxdumptool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hcxdumptool.c b/hcxdumptool.c index 5a429f89..b66af102 100644 --- a/hcxdumptool.c +++ b/hcxdumptool.c @@ -5461,8 +5461,8 @@ if(rooterrorflag == true) exit(EXIT_FAILURE); if((monitormodeflag == true) || (interfacelistflag == true) || (interfaceinfoflag == true) || (interfacelistshortflag == true)) return EXIT_SUCCESS; fprintf(stdout, "\n\033[?25h"); errorcount += errortxcount; -fprintf(stderr, "%u ERROR(s) during runtime\n", errorcount); -fprintf(stderr, "%u TX ERROR(s) during runtime\n", errortxcount); +if(errorcount > 0) fprintf(stderr, "%u ERROR(s) during runtime\n", errorcount); +if(errortxcount > 0) fprintf(stderr, "%u TX ERROR(s) during runtime\n", errortxcount); if(errorcount > 0) fprintf(stderr, "Possible reasons:\n" " driver is broken\n" " driver is busy (misconfigured system, other services access the INTERFACE)\n");