Fix yearly statistics after 64-bit time changes

One of the "+1900" cases got incorrectly dropped.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
[ I really wanted the utc_mkdate/mktime functions to use proper years,
  rather than the idiotic "offset by 1900".  However, we still mix
  things with "localtime()" in one place, so for now we have to be
  compatible with the insane tm_year semantics.  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Miika Turkia 2012-09-20 22:13:55 +03:00 committed by Linus Torvalds
parent e8578ad9c9
commit 49948e205b

View file

@ -412,7 +412,7 @@ static void process_all_dives(struct dive *dive, struct dive **prev_dive)
if (current_year == 0)
current_year = tm.tm_year + 1900;
if (current_year != tm.tm_year) {
if (current_year != tm.tm_year + 1900) {
current_year = tm.tm_year + 1900;
process_dive(dp, &(stats_yearly[++year_iter]));
} else