From e1c9b6f16a257b4ffff961d59fc9204847eca1f4 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Tue, 27 Feb 2007 18:51:57 +0000 Subject: [PATCH] * armos.c (SWIflen): Do not treate file descriptor zero as special. --- sim/arm/ChangeLog | 5 +++++ sim/arm/armos.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 10c75ad1c43..43523fd208d 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,8 @@ +2007-02-27 Mark Mitchell + + * armos.c (SWIflen): Do not treate file descriptor zero as + special. + 2007-02-15 Nick Clifton * armemu.c (handle_v6_insn): Fix typo in sign extension test of diff --git a/sim/arm/armos.c b/sim/arm/armos.c index 77390521009..39b9d4f0615 100644 --- a/sim/arm/armos.c +++ b/sim/arm/armos.c @@ -401,7 +401,7 @@ SWIflen (ARMul_State * state, ARMword fh) struct OSblock *OSptr = (struct OSblock *) state->OSptr; ARMword addr; - if (fh == 0 || fh > FOPEN_MAX) + if (fh > FOPEN_MAX) { OSptr->ErrorNo = EBADF; state->Reg[0] = -1L; -- 2.30.2