| 555 | } |
| 556 | |
| 557 | static int set_time(long hour, long minute, long second, struct tm *tm) |
| 558 | { |
| 559 | /* We accept 61st second because of leap second */ |
| 560 | if (0 <= hour && hour <= 24 && |
| 561 | 0 <= minute && minute < 60 && |
| 562 | 0 <= second && second <= 60) { |
| 563 | tm->tm_hour = hour; |
| 564 | tm->tm_min = minute; |
| 565 | tm->tm_sec = second; |
| 566 | return 0; |
| 567 | } |
| 568 | return -1; |
| 569 | } |
| 570 | |
| 571 | static int is_date_known(struct tm *tm) |
| 572 | { |
no outgoing calls
no test coverage detected