diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-06-08 23:57:49 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-06-09 00:01:11 +0200 |
commit | fb80276084a9adc0014b1008f8bf8253f126293b (patch) | |
tree | 2951be23576c32ddcda656c04c98539591981622 /src/file.c | |
parent | docker: bump base image (diff) | |
download | cimple-fb80276084a9adc0014b1008f8bf8253f126293b.tar.gz cimple-fb80276084a9adc0014b1008f8bf8253f126293b.zip |
add {file,net}_close as a wrapper to close(2)
Diffstat (limited to '')
-rw-r--r-- | src/file.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -98,6 +98,11 @@ free: return NULL; } +void file_close(int fd) +{ + log_errno_if(close(fd), "close"); +} + int file_exists(const char *path) { struct stat stat; |