| 507 | */ |
| 508 | |
| 509 | int /* O - Next delay value */ |
| 510 | _cupsNextDelay(int current, /* I - Current delay value or 0 */ |
| 511 | int *previous) /* IO - Previous delay value */ |
| 512 | { |
| 513 | int next; /* Next delay value */ |
| 514 | |
| 515 | |
| 516 | if (current > 0) |
| 517 | { |
| 518 | next = (current + *previous) % 12; |
| 519 | *previous = next < current ? 0 : current; |
| 520 | } |
| 521 | else |
| 522 | { |
| 523 | next = 1; |
| 524 | *previous = 0; |
| 525 | } |
| 526 | |
| 527 | return (next); |
| 528 | } |
| 529 | |
| 530 | |
| 531 | /* |
no outgoing calls
no test coverage detected