File: 0012-Fix-if-variable-0xF0-0x30.patch

package info (click to toggle)
xmbmon 2.05-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 992 kB
  • sloc: ansic: 6,088; sh: 2,185; perl: 87; makefile: 82
file content (24 lines) | stat: -rw-r--r-- 785 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: =?utf-8?b?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz>
Date: Tue, 26 Aug 2025 17:54:11 +0200
Subject: Fix if((variable && 0xF0) == 0x30)

sens_lm90.c:134:13: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
  134 |                 if ((revd && 0xF0) == 0x30)
      |                           ^  ~~~~
---
 sens_lm90.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sens_lm90.c b/sens_lm90.c
index 9e666fb..0756975 100644
--- a/sens_lm90.c
+++ b/sens_lm90.c
@@ -131,7 +131,7 @@ static int lm90_ident(LM_METHODS *method)
 	if (vend == 0x01 && revd == 0x21)
 		lm90chipid = LM90;
 	else if (vend == 0x41) {
-		if ((revd && 0xF0) == 0x30)
+		if ((revd & 0xF0) == 0x30)
 			lm90chipid = ADM1023;
 		else
 			lm90chipid = ADM1020;