Module Name: src
Committed By: kamil
Date: Sun Sep 22 09:03:07 UTC 2019
Modified Files:
src/sys/dev/ic: malo.c
Log Message:
Reduce always true comparison in malo_cmd_set_txpower()
powerlevel is already checked for >=30 in the previous condition.
Found by the lgtm bot.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/malo.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/malo.c
diff -u src/sys/dev/ic/malo.c:1.15 src/sys/dev/ic/malo.c:1.16
--- src/sys/dev/ic/malo.c:1.15 Fri Dec 14 21:23:43 2018
+++ src/sys/dev/ic/malo.c Sun Sep 22 09:03:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: malo.c,v 1.15 2018/12/14 21:23:43 jakllsch Exp $ */
+/* $NetBSD: malo.c,v 1.16 2019/09/22 09:03:07 kamil Exp $ */
/* $OpenBSD: malo.c,v 1.92 2010/08/27 17:08:00 jsg Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.15 2018/12/14 21:23:43 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.16 2019/09/22 09:03:07 kamil Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -2156,7 +2156,7 @@ malo_cmd_set_txpower(struct malo_softc *
body->action = htole16(1);
if (powerlevel < 30)
body->supportpowerlvl = htole16(5); /* LOW */
- else if (powerlevel >= 30 && powerlevel < 60)
+ else if (powerlevel < 60)
body->supportpowerlvl = htole16(10); /* MEDIUM */
else
body->supportpowerlvl = htole16(15); /* HIGH */