All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vsprintf: Drop unused assignment of fmt.state
@ 2025-02-05 17:25 I Hsin Cheng
  2025-02-06 15:32 ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: I Hsin Cheng @ 2025-02-05 17:25 UTC (permalink / raw)
  To: pmladek
  Cc: rostedt, andriy.shevchenko, linux, senozhatsky, akpm,
	linux-kernel, jserv, shuah, I Hsin Cheng

Remove unused assignment of "fmt.state", in both cases the value of
"fmt.state" will be overwritten by either "FORMAT_STATE_PRECISION" or
"FORMAT_STATE_NUM", the value "FORMAT_STATE_NONE" isn't going to be used
after the assignment.

Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
---
 lib/vsprintf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 56fe96319292..400299465875 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -2569,7 +2569,7 @@ struct fmt format_decode(struct fmt fmt, struct printf_spec *spec)
 			spec->field_width = -spec->field_width;
 			spec->flags |= LEFT;
 		}
-		fmt.state = FORMAT_STATE_NONE;
+
 		goto precision;
 	}
 
@@ -2578,7 +2578,7 @@ struct fmt format_decode(struct fmt fmt, struct printf_spec *spec)
 		if (spec->precision < 0)
 			spec->precision = 0;
 
-		fmt.state = FORMAT_STATE_NONE;
+
 		goto qualifier;
 	}
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-02-12 12:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 17:25 [PATCH] vsprintf: Drop unused assignment of fmt.state I Hsin Cheng
2025-02-06 15:32 ` Andy Shevchenko
2025-02-10  8:15   ` I Hsin Cheng
2025-02-10 13:09   ` Petr Mladek
2025-02-10 15:08     ` Andy Shevchenko
2025-02-12 12:29       ` Petr Mladek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.