| 498 | } |
| 499 | |
| 500 | static s64 get_next_pay_index(struct db *db) |
| 501 | { |
| 502 | /* Equivalent to (next_pay_index++) */ |
| 503 | s64 next_pay_index; |
| 504 | next_pay_index = db_get_intvar(db, "next_pay_index", 0); |
| 505 | /* Variable should exist. */ |
| 506 | assert(next_pay_index > 0); |
| 507 | db_set_intvar(db, "next_pay_index", next_pay_index + 1); |
| 508 | return next_pay_index; |
| 509 | } |
| 510 | |
| 511 | static enum invoice_status invoice_get_status(struct invoices *invoices, struct invoice invoice) |
| 512 | { |
no test coverage detected