Merge pull request #31004 from AdrianVovk/misc-cleanups

Misc cleanups
This commit is contained in:
Mike Yuan
2024-01-20 16:43:20 +08:00
committed by GitHub
10 changed files with 52 additions and 65 deletions
+5
View File
@@ -52,6 +52,11 @@ static inline void fclosep(FILE **f) {
safe_fclose(*f);
}
static inline void* close_fd_ptr(void *p) {
safe_close(PTR_TO_FD(p));
return NULL;
}
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(FILE*, pclose, NULL);
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(DIR*, closedir, NULL);