Skip to content

Commit 2a42a1f

Browse files
committed
rtlib: fb_hFileLineInputEx: Simplify eIM_Invalid handling
(cherry picked from commit bcc7eb3)
1 parent b0b3b88 commit 2a42a1f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/rtlib/file_lineinp.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ static int fb_hFileLineInputEx
3535
mode = eIM_Read;
3636
}
3737

38-
if( mode==eIM_Invalid ) {
39-
FB_UNLOCK();
40-
return fb_ErrorSetNum( FB_RTERROR_ILLEGALFUNCTIONCALL );
41-
}
42-
4338
switch( mode ) {
4439
case eIM_Read:
4540
/* This is the VFS-compatible way to read a line ... but it's slow */
@@ -118,9 +113,8 @@ static int fb_hFileLineInputEx
118113
}
119114
break;
120115
case eIM_Invalid:
121-
/* the "invalid" mode was already handled above ... so we don't
122-
* need to do anything here ... */
123-
break;
116+
FB_UNLOCK();
117+
return fb_ErrorSetNum( FB_RTERROR_ILLEGALFUNCTIONCALL );
124118
}
125119

126120
FB_UNLOCK();

0 commit comments

Comments
 (0)