[PATCH] vsprintf: Drop unused assignment of fmt.state

From: I Hsin Cheng
Date: Wed Feb 05 2025 - 12:25:29 EST


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@xxxxxxxxx>
---
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