| 343 | } |
| 344 | |
| 345 | static void timerfd_time_operation(time_t *sec, long *nsec) |
| 346 | { |
| 347 | if (*nsec < 0) |
| 348 | { |
| 349 | if (*sec > 0) |
| 350 | { |
| 351 | *sec -= 1; |
| 352 | *nsec = 1 * SEC_TO_NSEC + *nsec; |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | if (*sec < 0 || *nsec < 0) |
| 357 | { |
| 358 | *sec = 0; |
| 359 | *nsec = 0; |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | static int timerfd_do_settime(int fd, int flags, const struct itimerspec *new, struct itimerspec *old) |
| 364 | { |
no outgoing calls
no test coverage detected