| 321 | } |
| 322 | |
| 323 | static int close_and_clear(int *fd) |
| 324 | { |
| 325 | int ret = 0; |
| 326 | |
| 327 | if (*fd >= 0) { |
| 328 | ret = close(*fd); |
| 329 | *fd = -1; |
| 330 | } |
| 331 | |
| 332 | return ret; |
| 333 | } |
| 334 | |
| 335 | void write_pc_item(struct parallel_checkout_item *pc_item, |
| 336 | struct checkout *state) |