diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-10-18 21:20:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-10-18 21:20:40 +0000 |
commit | e77f8d2d8cdff938f296454ccbd80c11a9e4b73a (patch) | |
tree | 8db4e90e3086ba1151b8e4bb828948386159b0dd /bin/csh/csh.c | |
parent | 3cdac5ca3eb5403b56125202d488f19be7fdeeaf (diff) |
do not name file descriptors fp, either
Diffstat (limited to 'bin/csh/csh.c')
-rw-r--r-- | bin/csh/csh.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c index 3fd9d6972df..6a693cfca3f 100644 --- a/bin/csh/csh.c +++ b/bin/csh/csh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: csh.c,v 1.23 2005/12/11 02:41:01 deraadt Exp $ */ +/* $OpenBSD: csh.c,v 1.24 2006/10/18 21:20:39 deraadt Exp $ */ /* $NetBSD: csh.c,v 1.14 1995/04/29 23:21:28 mycroft Exp $ */ /*- @@ -40,7 +40,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)csh.c 8.2 (Berkeley) 10/12/93"; #else -static char rcsid[] = "$OpenBSD: csh.c,v 1.23 2005/12/11 02:41:01 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: csh.c,v 1.24 2006/10/18 21:20:39 deraadt Exp $"; #endif #endif /* not lint */ @@ -777,7 +777,7 @@ void rechist(void) { Char buf[BUFSIZ], hbuf[BUFSIZ], *hfile; - int fp, ftmp, oldidfds; + int fd, ftmp, oldidfds; struct varent *shist; if (!fast) { @@ -802,18 +802,18 @@ rechist(void) (void) Strlcat(buf, STRsldthist, sizeof buf/sizeof(Char)); } - if ((fp = open(short2str(hfile), O_WRONLY | O_CREAT | O_TRUNC, + if ((fd = open(short2str(hfile), O_WRONLY | O_CREAT | O_TRUNC, 0600)) == -1) return; oldidfds = didfds; didfds = 0; ftmp = SHOUT; - SHOUT = fp; + SHOUT = fd; dumphist[2] = hbuf; dohist(dumphist, NULL); SHOUT = ftmp; - (void) close(fp); + (void) close(fd); didfds = oldidfds; } } |