зеркало из https://github.com/github/ruby.git
* 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:
Родитель
5073155a17
Коммит
deaba5567d
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче