Coverity 703490: better zero out sigact
This commit is contained in:
parent
252a7ce68f
commit
df81e96d67
@ -27,7 +27,7 @@
|
|||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.125 2012/05/05 18:04:20 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.126 2012/06/24 19:47:11 tg Exp $");
|
||||||
|
|
||||||
Trap sigtraps[NSIG + 1];
|
Trap sigtraps[NSIG + 1];
|
||||||
static struct sigaction Sigact_ign;
|
static struct sigaction Sigact_ign;
|
||||||
@ -1375,6 +1375,8 @@ setsig(Trap *p, sig_t f, int flags)
|
|||||||
if (p->signal == ksh_SIGEXIT || p->signal == ksh_SIGERR)
|
if (p->signal == ksh_SIGEXIT || p->signal == ksh_SIGERR)
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
|
memset(&sigact, 0, sizeof(sigact));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First time setting this signal? If so, get and note the current
|
* First time setting this signal? If so, get and note the current
|
||||||
* setting.
|
* setting.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user