Skip to contentSkip to conversation

alpha: Fix warning comparing pointer to 0

PATCH New Yang Li 1 participant 1 message Feb 8, 2023 Alpha port

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 alpha: Fix warning comparing pointer to 0

./arch/alpha/kernel/smp.c:271:39-40: WARNING comparing pointer to 0

Avoid pointer type value compared with 0 to make code clear.

---
 arch/alpha/kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/kernel/smp.c +1 -1
index 0ede4b044e86..3edf1e572d10 100644
@@ -268,7 +268,7 @@ recv_secondary_console_msg(void)
 			memcpy(cp2, cp1, cnt);
 			cp2[cnt] = '\0';
 			
-			while ((cp2 = strchr(cp2, '\r')) != 0) {
+			while ((cp2 = strchr(cp2, '\r'))) {
 				*cp2 = ' ';
 				if (cp2[1] == '\n')
 					cp2[1] = ' ';
Signature · 1 line
2.20.1.7.g153144c