| 975 | |
| 976 | #ifdef HAVE_FTRUNCATE |
| 977 | int do_ftruncate(int fd, OFF_T size) |
| 978 | { |
| 979 | int ret; |
| 980 | |
| 981 | if (dry_run) return 0; |
| 982 | RETURN_ERROR_IF_RO_OR_LO; |
| 983 | |
| 984 | do { |
| 985 | ret = ftruncate(fd, size); |
| 986 | } while (ret < 0 && errno == EINTR); |
| 987 | |
| 988 | return ret; |
| 989 | } |
| 990 | #endif |
| 991 | |
| 992 | void trim_trailing_slashes(char *name) |
no outgoing calls
no test coverage detected