[PATCH] lib: fwts_log: remove redundant initialization of ptr1

Colin King colin.king at canonical.com
Wed Jan 31 10:07:32 UTC 2018


From: Colin Ian King <colin.king at canonical.com>

Pointer ptr1 is initialized to str and then again in a for-loop,
hence the initialization is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/lib/src/fwts_log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/src/fwts_log.c b/src/lib/src/fwts_log.c
index beceb98b..c699e4dc 100644
--- a/src/lib/src/fwts_log.c
+++ b/src/lib/src/fwts_log.c
@@ -139,7 +139,7 @@ char *fwts_log_field_to_str_full(const fwts_log_field field)
 char *fwts_log_field_to_str_upper(const fwts_log_field field)
 {
 	static char str[16];
-	char *ptr1 = str;
+	char *ptr1;
 	char *ptr2 = fwts_log_field_to_str_full(field);
 
 	for (ptr1 = str; *ptr2; ptr1++, ptr2++)
-- 
2.15.1




More information about the fwts-devel mailing list