[PATCH] x86/boot: remove redundant initialization of variable delta

From: Colin Ian King
Date: Tue Dec 19 2023 - 09:14:14 EST


The variable delta is being initialized with a value that is never
read. The assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>
---
arch/x86/boot/string.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c
index 1c8541ae3b3a..c23f3b9c84fe 100644
--- a/arch/x86/boot/string.c
+++ b/arch/x86/boot/string.c
@@ -49,7 +49,7 @@ int strcmp(const char *str1, const char *str2)
{
const unsigned char *s1 = (const unsigned char *)str1;
const unsigned char *s2 = (const unsigned char *)str2;
- int delta = 0;
+ int delta;

while (*s1 || *s2) {
delta = *s1 - *s2;
--
2.39.2