Coverity 1416285
This commit is contained in:
parent
5f58b04c54
commit
144268cf94
@ -27,7 +27,7 @@
|
|||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.164 2017/08/07 20:43:00 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.165 2017/08/07 23:15:47 tg Exp $");
|
||||||
|
|
||||||
Trap sigtraps[ksh_NSIG + 1];
|
Trap sigtraps[ksh_NSIG + 1];
|
||||||
static struct sigaction Sigact_ign;
|
static struct sigaction Sigact_ign;
|
||||||
@ -784,8 +784,8 @@ hist_persist_init(void)
|
|||||||
/* we have a file and are interactive */
|
/* we have a file and are interactive */
|
||||||
if ((fd = binopen3(hname, O_RDWR | O_CREAT | O_APPEND, 0600)) < 0)
|
if ((fd = binopen3(hname, O_RDWR | O_CREAT | O_APPEND, 0600)) < 0)
|
||||||
return;
|
return;
|
||||||
|
if ((histfd = savefd(fd)) < 0)
|
||||||
histfd = savefd(fd);
|
return;
|
||||||
if (histfd != fd)
|
if (histfd != fd)
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user