| 85 | } |
| 86 | |
| 87 | int flock_close(struct reftable_flock *l) |
| 88 | { |
| 89 | struct lock_file *lockfile = l->priv; |
| 90 | int ret; |
| 91 | |
| 92 | if (!lockfile) |
| 93 | return REFTABLE_API_ERROR; |
| 94 | |
| 95 | ret = close_lock_file_gently(lockfile); |
| 96 | l->fd = -1; |
| 97 | if (ret < 0) |
| 98 | return REFTABLE_IO_ERROR; |
| 99 | |
| 100 | return 0; |
| 101 | } |
| 102 | |
| 103 | int flock_release(struct reftable_flock *l) |
| 104 | { |
no test coverage detected