| 324 | } |
| 325 | |
| 326 | int reopen_tempfile(struct tempfile *tempfile) |
| 327 | { |
| 328 | if (!is_tempfile_active(tempfile)) |
| 329 | BUG("reopen_tempfile called for an inactive object"); |
| 330 | if (0 <= tempfile->fd) |
| 331 | BUG("reopen_tempfile called for an open object"); |
| 332 | tempfile->fd = open(tempfile->filename.buf, O_WRONLY|O_TRUNC); |
| 333 | return tempfile->fd; |
| 334 | } |
| 335 | |
| 336 | int rename_tempfile(struct tempfile **tempfile_p, const char *path) |
| 337 | { |
no test coverage detected