| 121 | } |
| 122 | |
| 123 | void stat_validity_update(struct stat_validity *sv, int fd) |
| 124 | { |
| 125 | struct stat st; |
| 126 | |
| 127 | if (fstat(fd, &st) < 0 || !S_ISREG(st.st_mode)) |
| 128 | stat_validity_clear(sv); |
| 129 | else { |
| 130 | if (!sv->sd) |
| 131 | CALLOC_ARRAY(sv->sd, 1); |
| 132 | fill_stat_data(sv->sd, &st); |
| 133 | } |
| 134 | } |
no test coverage detected