mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (linux_get_maxfd): change local variable name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c6dec37649
commit
eecacaa024
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Dec 1 22:31:16 2011 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* io.c (linux_get_maxfd): change local variable name.
|
||||||
|
|
||||||
Thu Dec 1 20:33:22 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
Thu Dec 1 20:33:22 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
||||||
|
|
||||||
* proc.c (rb_proc_arity): Fix Proc#arity in case of optional
|
* proc.c (rb_proc_arity): Fix Proc#arity in case of optional
|
||||||
|
|
8
io.c
8
io.c
|
@ -5162,7 +5162,7 @@ static int
|
||||||
linux_get_maxfd(void)
|
linux_get_maxfd(void)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
char buf[4096], *p, *n, *e;
|
char buf[4096], *p, *np, *e;
|
||||||
ssize_t ss;
|
ssize_t ss;
|
||||||
fd = rb_cloexec_open("/proc/self/status", O_RDONLY|O_NOCTTY, 0);
|
fd = rb_cloexec_open("/proc/self/status", O_RDONLY|O_NOCTTY, 0);
|
||||||
if (fd == -1) return -1;
|
if (fd == -1) return -1;
|
||||||
|
@ -5171,16 +5171,16 @@ linux_get_maxfd(void)
|
||||||
p = buf;
|
p = buf;
|
||||||
e = buf + ss;
|
e = buf + ss;
|
||||||
while ((int)sizeof("FDSize:\t0\n")-1 <= e-p &&
|
while ((int)sizeof("FDSize:\t0\n")-1 <= e-p &&
|
||||||
(n = memchr(p, '\n', e-p)) != NULL) {
|
(np = memchr(p, '\n', e-p)) != NULL) {
|
||||||
if (memcmp(p, "FDSize:", sizeof("FDSize:")-1) == 0) {
|
if (memcmp(p, "FDSize:", sizeof("FDSize:")-1) == 0) {
|
||||||
int fdsize;
|
int fdsize;
|
||||||
p += sizeof("FDSize:")-1;
|
p += sizeof("FDSize:")-1;
|
||||||
*n = '\0';
|
*np = '\0';
|
||||||
fdsize = (int)ruby_strtoul(p, (char **)NULL, 10);
|
fdsize = (int)ruby_strtoul(p, (char **)NULL, 10);
|
||||||
close(fd);
|
close(fd);
|
||||||
return fdsize;
|
return fdsize;
|
||||||
}
|
}
|
||||||
p = n+1;
|
p = np+1;
|
||||||
}
|
}
|
||||||
/* fall through */
|
/* fall through */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue