From aa3e9c1d1e6d2495299b1c1286ae7365d773ffb3 Mon Sep 17 00:00:00 2001 From: Hess Nathan Date: Mon, 29 Apr 2024 15:29:43 +0200 Subject: [PATCH] coding guidelines: comply with MISRA Rule 2.2 - avoided dead stores Signed-off-by: Hess Nathan --- arch/x86/zefi/printf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/zefi/printf.h b/arch/x86/zefi/printf.h index 69f991bcd8..f90a54ec3f 100644 --- a/arch/x86/zefi/printf.h +++ b/arch/x86/zefi/printf.h @@ -143,7 +143,7 @@ static int vpf(struct _pfr *r, const char *f, va_list ap) static inline int snprintf(char *buf, unsigned long len, const char *f, ...) { - int ret = 0; + int ret; struct _pfr r = { .buf = buf, .len = len }; CALL_VPF(&r); @@ -152,7 +152,7 @@ static inline int snprintf(char *buf, unsigned long len, const char *f, ...) static inline int sprintf(char *buf, const char *f, ...) { - int ret = 0; + int ret; struct _pfr r = { .buf = buf, .len = 0x7fffffff }; CALL_VPF(&r); @@ -161,7 +161,7 @@ static inline int sprintf(char *buf, const char *f, ...) static inline int printf(const char *f, ...) { - int ret = 0; + int ret; struct _pfr r = {0}; CALL_VPF(&r);