about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-08-22 10:29:04 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-08-22 10:29:04 +0000
commitf5dccc2e8e0cfbfce5cc0e08e8b16a43704484a3 (patch)
treeb663a1e6c44ab552b90842492a557338e11dfeb9
parentd74c4a3c123b2a548268d4468ee45f8ab12b3c97 (diff)
downloadbcnm-f5dccc2e8e0cfbfce5cc0e08e8b16a43704484a3.tar.gz
bcnm-f5dccc2e8e0cfbfce5cc0e08e8b16a43704484a3.tar.xz
bcnm-f5dccc2e8e0cfbfce5cc0e08e8b16a43704484a3.zip
No need to save errno around fd_close
-rw-r--r--src/libwpactrl/wpactrl_start.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/libwpactrl/wpactrl_start.c b/src/libwpactrl/wpactrl_start.c
index 80018d5..ac77870 100644
--- a/src/libwpactrl/wpactrl_start.c
+++ b/src/libwpactrl/wpactrl_start.c
@@ -34,17 +34,9 @@ int wpactrl_start (wpactrl_t *a, char const *path, unsigned int timeout, tain_t
   return 1 ;
 
  erra:
-  {
-    int e = errno ;
-    fd_close(fda) ;
-    errno = e ;
-  }
+  fd_close(fda) ;
  errs:
-  {
-    int e = errno ;
-    fd_close(fds) ;
-    errno = e ;
-  }
+  fd_close(fds) ;
  err:
   return 0 ;
 }