[PATCH 04/13] format-check: merge 'fmt_string' & 'string'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Those are 2 variables for the same things. Merge them.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 verify-format.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/verify-format.c b/verify-format.c
index fd5a9ed821e1..99a36c8eef5f 100644
--- a/verify-format.c
+++ b/verify-format.c
@@ -524,7 +524,7 @@ void verify_format_attribute(struct symbol *fn, struct expression_list *args)
 	struct format_state state = { };
 	struct expression *expr;
 	struct expression *init;
-	const char *fmt_string;
+	const char *string;
 
 	if (!fn || !Wformat)
 		return;
@@ -540,16 +540,15 @@ void verify_format_attribute(struct symbol *fn, struct expression_list *args)
 	init = expr->symbol->initializer;
 	if (!init || init->type != EXPR_STRING)
 		return;			// not a string
-	fmt_string = init->string->data;
+	string = init->string->data;
 
 	state.expr = expr;
 	state.first = fn->ctype.format.first;
 	state.arg_index = fn->ctype.format.first;
 
-	if (!fmt_string) {
+	if (!string) {
 		warning(expr->pos, "not a format string?");
 	} else {
-		const char *string = fmt_string;
 		int fail = 0;
 
 		while (string[0]) {
-- 
2.28.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux