Skip to content

Commit aa3e9c1

Browse files
DeHessnashif
authored andcommitted
coding guidelines: comply with MISRA Rule 2.2
- avoided dead stores Signed-off-by: Hess Nathan <[email protected]>
1 parent 40a8022 commit aa3e9c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/x86/zefi/printf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static int vpf(struct _pfr *r, const char *f, va_list ap)
143143

144144
static inline int snprintf(char *buf, unsigned long len, const char *f, ...)
145145
{
146-
int ret = 0;
146+
int ret;
147147
struct _pfr r = { .buf = buf, .len = len };
148148

149149
CALL_VPF(&r);
@@ -152,7 +152,7 @@ static inline int snprintf(char *buf, unsigned long len, const char *f, ...)
152152

153153
static inline int sprintf(char *buf, const char *f, ...)
154154
{
155-
int ret = 0;
155+
int ret;
156156
struct _pfr r = { .buf = buf, .len = 0x7fffffff };
157157

158158
CALL_VPF(&r);
@@ -161,7 +161,7 @@ static inline int sprintf(char *buf, const char *f, ...)
161161

162162
static inline int printf(const char *f, ...)
163163
{
164-
int ret = 0;
164+
int ret;
165165
struct _pfr r = {0};
166166

167167
CALL_VPF(&r);

0 commit comments

Comments
 (0)