aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-18 09:15:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-18 09:15:46 +0000
commit506c3137462201a62261e3d893741a0411bcfa27 (patch)
tree0ffcd99ea2e480022694f19f02ec6d338002762e /ext
parent6bb9a8687027f42d50ea90bd646a29c1a11b3ad9 (diff)
downloadruby-506c3137462201a62261e3d893741a0411bcfa27.tar.gz
pty.c: typo
* ext/pty/pty.c (chfunc): fix a typo of an operator. pointed out by jaruga (Jun Aruga) at [ruby-core:89058]. [Bug #15116] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/pty/pty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 33e727e765..fc2e529408 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -143,7 +143,7 @@ chfunc(void *data, char *errbuf, size_t errbuf_len)
dup2(slave,0);
dup2(slave,1);
dup2(slave,2);
- if (slave < 0 && slave > 2) (void)!close(slave);
+ if (slave < 0 || slave > 2) (void)!close(slave);
#if defined(HAVE_SETEUID) || defined(HAVE_SETREUID) || defined(HAVE_SETRESUID)
if (seteuid(getuid())) ERROR_EXIT("seteuid()");
#endif