summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/execline/execlineb.c4
-rw-r--r--src/execline/redirfd.c3
2 files changed, 0 insertions, 7 deletions
diff --git a/src/execline/execlineb.c b/src/execline/execlineb.c
index 64b168d..f94da6e 100644
--- a/src/execline/execlineb.c
+++ b/src/execline/execlineb.c
@@ -1,7 +1,6 @@
/* ISC license. */
#include <string.h>
-#include <errno.h>
#include <skalibs/types.h>
#include <skalibs/allreadwrite.h>
#include <skalibs/sgetopt.h>
@@ -108,16 +107,13 @@ int main (int argc, char const *const *argv, char const *const *envp)
char buf[BUFFER_INSIZE] ;
buffer b ;
int fd ;
- int e ;
if (!argc--) strerr_dieusage(100, USAGE) ;
dollar0 = *argv++ ;
fd = open_readb(dollar0) ;
if (fd < 0) strerr_diefu3sys(111, "open ", dollar0, " for reading") ;
buffer_init(&b, &fd_readv, fd, buf, BUFFER_INSIZE) ;
nc = el_parse_from_buffer(&sa, &b) ;
- e = errno ;
fd_close(fd) ;
- errno = e ;
}
switch (nc)
diff --git a/src/execline/redirfd.c b/src/execline/redirfd.c
index 1539946..93e1582 100644
--- a/src/execline/redirfd.c
+++ b/src/execline/redirfd.c
@@ -44,13 +44,10 @@ int main (int argc, char const *const *argv, char const *const *envp)
fd2 = open3(argv[1], flags, 0666) ;
if ((fd2 == -1) && (what == O_WRONLY) && (errno == ENXIO))
{
- int e ;
int fdr = open_read(argv[1]) ;
if (fdr == -1) strerr_diefu2sys(111, "open_read ", argv[1]) ;
fd2 = open3(argv[1], flags, 0666) ;
- e = errno ;
fd_close(fdr) ;
- errno = e ;
}
if (fd2 == -1) strerr_diefu2sys(111, "open ", argv[1]) ;
if (fd_move(fd, fd2) == -1)