mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/pty/pty.c (get_device_once): raise on error when fail is
non-zero. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5073155a17
commit
deaba5567d
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Feb 28 21:32:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/pty/pty.c (get_device_once): raise on error when fail is
|
||||
non-zero.
|
||||
|
||||
Sun Feb 28 18:58:00 2010 Kenta Murata <mrkn@mrkn.jp>
|
||||
|
||||
* math.c (rb_eMathDomainError): new exception class
|
||||
|
|
|
@ -319,7 +319,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
|
|||
error:
|
||||
if (slavefd != -1) close(slavefd);
|
||||
if (masterfd != -1) close(masterfd);
|
||||
if (!fail) {
|
||||
if (fail) {
|
||||
rb_raise(rb_eRuntimeError, "can't get Master/Slave device");
|
||||
}
|
||||
return -1;
|
||||
|
@ -383,7 +383,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
|
|||
error:
|
||||
if (slavefd != -1) close(slavefd);
|
||||
if (masterfd != -1) close(masterfd);
|
||||
if (!fail) rb_raise(rb_eRuntimeError, "can't get Master/Slave device");
|
||||
if (fail) rb_raise(rb_eRuntimeError, "can't get Master/Slave device");
|
||||
return -1;
|
||||
#else
|
||||
int masterfd = -1, slavefd = -1;
|
||||
|
|
Loading…
Reference in a new issue