use proper parenthesēs; int → bool; use same var (eno) for temp. errno

This commit is contained in:
tg
2012-11-30 19:02:10 +00:00
parent e36075e58d
commit 80e364b7ad
6 changed files with 22 additions and 21 deletions

8
exec.c
View File

@@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.105 2012/10/30 20:13:17 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.106 2012/11/30 19:02:06 tg Exp $");
#ifndef MKSH_DEFAULT_EXECSHELL
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
@@ -1385,13 +1385,13 @@ iosetup(struct ioword *iop, struct tbl *tp)
close(iop->unit);
else if (u != iop->unit) {
if (ksh_dup2(u, iop->unit, true) < 0) {
int ev;
int eno;
ev = errno;
eno = errno;
warningf(true, "%s %s %s",
"can't finish (dup) redirection",
snptreef(NULL, 32, "%R", &iotmp),
strerror(ev));
strerror(eno));
if (iotype != IODUP)
close(u);
return (-1);