[PATCH v2 03/10] LoongArch: Terminate the cmdline string using '\0'
Youling Tang
youling.tang at linux.dev
Mon Sep 15 18:46:48 PDT 2025
From: Youling Tang <tangyouling at kylinos.cn>
Terminate the cmdline string using '\0' instead of 0, improve code readability.
Signed-off-by: Youling Tang <tangyouling at kylinos.cn>
---
kexec/arch/loongarch/kexec-loongarch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kexec/arch/loongarch/kexec-loongarch.c b/kexec/arch/loongarch/kexec-loongarch.c
index ea0c316..c335e0b 100644
--- a/kexec/arch/loongarch/kexec-loongarch.c
+++ b/kexec/arch/loongarch/kexec-loongarch.c
@@ -334,7 +334,7 @@ int loongarch_load_other_segments(struct kexec_info *info, unsigned long hole_mi
}
}
- cmdline[sizeof(cmdline) - 1] = 0;
+ cmdline[sizeof(cmdline) - 1] = '\0';
add_buffer(info, cmdline, sizeof(cmdline), sizeof(cmdline),
sizeof(void *), _ALIGN_UP(hole_min, getpagesize()),
hole_max, 1);
--
2.34.1
More information about the kexec
mailing list