Unbotch whitespace and change switch with two cases to if.

Noticed by:	bde
This commit is contained in:
Eivind Eklund 1998-05-07 00:42:25 +00:00
parent a95587674c
commit d563a53a79
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35820
2 changed files with 18 additions and 24 deletions

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_sysvec.c,v 1.27 1998/04/13 17:49:51 sos Exp $
* $Id: linux_sysvec.c,v 1.28 1998/04/28 18:15:06 eivind Exp $
*/
/* XXX we use functions that might not exist. */
@ -105,17 +105,14 @@ int linux_to_bsd_signal[LINUX_NSIG] = {
static int
translate_traps(int signal, int trap_code)
{
switch(signal) {
case SIGBUS:
switch(trap_code) {
case T_PROTFLT:
case T_TSSFLT:
case T_DOUBLEFLT:
case T_PAGEFLT:
return SIGSEGV;
default:
return signal;
}
if (signal != SIGBUS)
return signal;
switch (trap_code) {
case T_PROTFLT:
case T_TSSFLT:
case T_DOUBLEFLT:
case T_PAGEFLT:
return SIGSEGV;
default:
return signal;
}

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_sysvec.c,v 1.27 1998/04/13 17:49:51 sos Exp $
* $Id: linux_sysvec.c,v 1.28 1998/04/28 18:15:06 eivind Exp $
*/
/* XXX we use functions that might not exist. */
@ -105,17 +105,14 @@ int linux_to_bsd_signal[LINUX_NSIG] = {
static int
translate_traps(int signal, int trap_code)
{
switch(signal) {
case SIGBUS:
switch(trap_code) {
case T_PROTFLT:
case T_TSSFLT:
case T_DOUBLEFLT:
case T_PAGEFLT:
return SIGSEGV;
default:
return signal;
}
if (signal != SIGBUS)
return signal;
switch (trap_code) {
case T_PROTFLT:
case T_TSSFLT:
case T_DOUBLEFLT:
case T_PAGEFLT:
return SIGSEGV;
default:
return signal;
}