From 7307c32f1fb139dea4f3a4cc51738c447ad6f4f3 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 11 Dec 2014 03:02:36 +0000 Subject: process.c: unused variables * process.c (rb_fork_async_signal_safe): remove initialized but never assigned local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'process.c') diff --git a/process.c b/process.c index 4a6f87d03b..25cdc1605b 100644 --- a/process.c +++ b/process.c @@ -3580,9 +3580,8 @@ rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), voi char *errmsg, size_t errmsg_buflen) { rb_pid_t pid; - int err, state = 0; + int err; int ep[2]; - VALUE exc = Qnil; int error_occurred; if (status) *status = 0; @@ -3593,14 +3592,12 @@ rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), voi return pid; close(ep[1]); error_occurred = recv_child_error(ep[0], &err, errmsg, errmsg_buflen); - if (state || error_occurred) { + if (error_occurred) { if (status) { rb_protect(proc_syswait, (VALUE)pid, status); - if (state) *status = state; } else { rb_syswait(pid); - if (state) rb_exc_raise(exc); } errno = err; return -1; -- cgit v1.2.3