diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-08-26 07:15:03 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-08-26 07:15:45 +0200 |
commit | 93b8646855353ab3adfe5fea8ccb5b0842ad8a0d (patch) | |
tree | c87ac95cd819f654d60e360f84a5559faa7de9fe /src/net.c | |
parent | fix macros (diff) | |
download | cimple-93b8646855353ab3adfe5fea8ccb5b0842ad8a0d.tar.gz cimple-93b8646855353ab3adfe5fea8ccb5b0842ad8a0d.zip |
add check_errno macro
Diffstat (limited to '')
-rw-r--r-- | src/net.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -49,7 +49,7 @@ int net_bind(const char *port) break; close_socket: - close(socket_fd); + check_errno(close(socket_fd), "close"); } freeaddrinfo(result); @@ -68,7 +68,7 @@ int net_bind(const char *port) return socket_fd; fail: - close(socket_fd); + check_errno(close(socket_fd), "close"); return ret; } @@ -117,7 +117,7 @@ int net_connect(const char *host, const char *port) break; close_socket: - close(socket_fd); + check_errno(close(socket_fd), "close"); } freeaddrinfo(result); |