1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

3b2: Coverity issue cleanup

This commit is contained in:
Seth Morabito
2017-11-30 16:30:53 +00:00
parent 0293d7f4af
commit 0a00d8066a
3 changed files with 9 additions and 2 deletions

View File

@@ -788,12 +788,18 @@ void tod_update_delta()
switch(td->year) {
case 1: /* Leap Year - 3 */
tm.tm_year = 85;
break;
case 2: /* Leap Year - 2 */
tm.tm_year = 86;
break;
case 4: /* Leap Year - 1 */
tm.tm_year = 87;
break;
case 8: /* Leap Year */
tm.tm_year = 88;
break;
default:
break;
}
tm.tm_isdst = 0;
ssec = mktime(&tm);
@@ -889,6 +895,7 @@ void tod_write(uint32 pa, uint32 val, size_t size)
break;
case 0x34: /* Year */
td->year = (uint8) val;
break;
case 0x38:
if (val & 1) {
tod_update_delta();