From c081a94223a6ecd5ca49a29b347509f7d279f59f Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 4 Sep 2012 19:01:34 +0000 Subject: The powerlevel is an unsigned int, there is no need to check for negative values and even if this would make more sense. Found by brad some time ago. --- sys/dev/ic/malo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/ic') diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c index 5aedf016bc8..b86af946cae 100644 --- a/sys/dev/ic/malo.c +++ b/sys/dev/ic/malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malo.c,v 1.93 2011/07/03 21:35:38 dhill Exp $ */ +/* $OpenBSD: malo.c,v 1.94 2012/09/04 19:01:33 claudio Exp $ */ /* * Copyright (c) 2006 Claudio Jeker @@ -2216,7 +2216,7 @@ malo_cmd_set_txpower(struct malo_softc *sc, unsigned int powerlevel) bzero(body, sizeof(*body)); body->action = htole16(1); - if (powerlevel >= 0 && powerlevel < 30) + if (powerlevel < 30) body->supportpowerlvl = htole16(5); /* LOW */ else if (powerlevel >= 30 && powerlevel < 60) body->supportpowerlvl = htole16(10); /* MEDIUM */ -- cgit v1.2.3