diff options
author | Thomas Jarosch <tomj@simonv.com> | 2015-01-04 17:35:22 +0100 |
---|---|---|
committer | Thomas Jarosch <tomj@simonv.com> | 2015-01-04 17:37:35 +0100 |
commit | b43fcbdab227b5bc29daf64d6660edc6cd5dc534 (patch) | |
tree | 10de14c8d6a53cee65cc135f9c31a479e707b0f5 | |
parent | 404ebb8b0b133711d0e8ec7ab057f71f14dd9590 (diff) | |
download | rockbox-b43fcbdab227b5bc29daf64d6660edc6cd5dc534.tar.gz rockbox-b43fcbdab227b5bc29daf64d6660edc6cd5dc534.zip |
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
-rw-r--r-- | firmware/libc/mktime.c | 1 |
1 files changed, 0 insertions, 1 deletions
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) | |||
40 | year -= 1; | 40 | year -= 1; |
41 | month += 12; | 41 | month += 12; |
42 | } | 42 | } |
43 | result = (year - 1970) * 365 + (year - 1969) / 4 + m_to_d[month]; | ||
44 | result = (year - 1970) * 365 + m_to_d[month]; | 43 | result = (year - 1970) * 365 + m_to_d[month]; |
45 | if (month <= 1) | 44 | if (month <= 1) |
46 | year -= 1; | 45 | year -= 1; |