From b9324acb75153cfd386d4dd6433b19b69ff6d99e Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 18 Apr 2016 12:23:09 +0200 Subject: [PATCH] unix: remove unneeded SAVE_ERRNO wrappers uv__close() won't clobber errno so there is no need to guard calls with a SAVE_ERRNO(...) wrapper. PR-URL: https://github.com/libuv/libuv/pull/837 Reviewed-By: Colin Ihrig --- src/unix/aix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/unix/aix.c b/src/unix/aix.c index 27736590b..2276985fc 100644 --- a/src/unix/aix.c +++ b/src/unix/aix.c @@ -1028,14 +1028,14 @@ int uv_interface_addresses(uv_interface_address_t** addresses, } if (ioctl(sockfd, SIOCGSIZIFCONF, &size) == -1) { - SAVE_ERRNO(uv__close(sockfd)); + uv__close(sockfd); return -errno; } ifc.ifc_req = (struct ifreq*)uv__malloc(size); ifc.ifc_len = size; if (ioctl(sockfd, SIOCGIFCONF, &ifc) == -1) { - SAVE_ERRNO(uv__close(sockfd)); + uv__close(sockfd); return -errno; } @@ -1054,7 +1054,7 @@ int uv_interface_addresses(uv_interface_address_t** addresses, memcpy(flg.ifr_name, p->ifr_name, sizeof(flg.ifr_name)); if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1) { - SAVE_ERRNO(uv__close(sockfd)); + uv__close(sockfd); return -errno; }