From b43fcbdab227b5bc29daf64d6660edc6cd5dc534 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Sun, 4 Jan 2015 17:35:22 +0100 Subject: [PATCH] mktime(): Remove redundant assignment of 'result' Checked with upstream lynx source code and the second calculation line is the upstream one, too. (In fact I diffed the whole function to check for changes) cppcheck reported: [rockbox/firmware/libc/mktime.c:43] -> [rockbox/firmware/libc/mktime.c:44]: (performance) Variable 'result' is reassigned a value before the old one has been used. Change-Id: Ia04c5f55da7d86cd74cff4fce675a9c85ddce3e2 --- firmware/libc/mktime.c | 1 - 1 file changed, 1 deletion(-) diff --git a/firmware/libc/mktime.c b/firmware/libc/mktime.c index eaa017122a..822f12e6e8 100644 --- a/firmware/libc/mktime.c +++ b/firmware/libc/mktime.c @@ -40,7 +40,6 @@ time_t mktime(struct tm *t) year -= 1; month += 12; } - result = (year - 1970) * 365 + (year - 1969) / 4 + m_to_d[month]; result = (year - 1970) * 365 + m_to_d[month]; if (month <= 1) year -= 1;