[前][次][番号順一覧][スレッド一覧]

ruby-changes:59620

From: Yusuke <ko1@a...>
Date: Sun, 5 Jan 2020 11:39:54 +0900 (JST)
Subject: [ruby-changes:59620] 44a164c26f (master): include/ruby/ruby.h: remove a variable tmp_buffer as it does not change

https://git.ruby-lang.org/ruby.git/commit/?id=44a164c26f

From 44a164c26f5371519636585d8ba7aa59f489442e Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Sun, 5 Jan 2020 11:36:10 +0900
Subject: include/ruby/ruby.h: remove a variable tmp_buffer as it does not
 change

It is no longer used due to beae6cbf0fd8b6619e5212552de98022d4c4d4d4.
Coverity Scan found this.

diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 56e293b..625636f 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -2520,7 +2520,6 @@ rb_scan_args_set(int argc, const VALUE *argv, https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2520
     int i, argi = 0, vari = 0;
     VALUE *var, hash = Qnil, last_hash = 0;
     const int n_mand = n_lead + n_trail;
-    VALUE tmp_buffer = 0;
 
     if (f_hash && argc > 0 && rb_keyword_given_p()) {
         hash = rb_hash_dup(argv[argc - 1]);
@@ -2589,11 +2588,9 @@ rb_scan_args_set(int argc, const VALUE *argv, https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2588
 
     if (argi < argc) {
       argc_error:
-        if (tmp_buffer) rb_free_tmp_buffer(&tmp_buffer);
         rb_error_arity(argc, n_mand, f_var ? UNLIMITED_ARGUMENTS : n_mand + n_opt);
     }
 
-    if (tmp_buffer) rb_free_tmp_buffer(&tmp_buffer);
     return argc;
 }
 #endif
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]