summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_sig.c12
-rw-r--r--sys/kern/tty_pty.c14
2 files changed, 15 insertions, 11 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 5a2a913667b..0fee524f520 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.79 2005/12/22 06:58:20 tedu Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.80 2006/01/18 23:42:12 miod Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -324,10 +324,12 @@ setsigvec(struct proc *p, int signum, struct sigaction *sa)
#ifdef COMPAT_SUNOS
{
extern struct emul emul_sunos;
- if (p->p_emul == &emul_sunos && sa->sa_flags & SA_USERTRAMP)
- ps->ps_usertramp |= bit;
- else
- ps->ps_usertramp &= ~bit;
+ if (p->p_emul == &emul_sunos) {
+ if (sa->sa_flags & SA_USERTRAMP)
+ ps->ps_usertramp |= bit;
+ else
+ ps->ps_usertramp &= ~bit;
+ }
}
#endif
/*
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index b095cbe2a44..ead1aa8cebf 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_pty.c,v 1.31 2005/12/21 12:43:49 jsg Exp $ */
+/* $OpenBSD: tty_pty.c,v 1.32 2006/01/18 23:42:12 miod Exp $ */
/* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */
/*
@@ -796,17 +796,19 @@ ptyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
case TIOCGPGRP:
#ifdef COMPAT_SUNOS
- {
+ {
/*
* I'm not sure about SunOS TIOCGPGRP semantics
* on PTYs, but it's something like this:
*/
extern struct emul emul_sunos;
- if (p->p_emul == &emul_sunos && tp->t_pgrp == 0)
- return (EIO);
- *(int *)data = tp->t_pgrp->pg_id;
- return (0);
+ if (p->p_emul == &emul_sunos) {
+ if (tp->t_pgrp == 0)
+ return (EIO);
+ *(int *)data = tp->t_pgrp->pg_id;
+ return (0);
}
+ }
#endif
/*
* We aviod calling ttioctl on the controller since,