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

ruby-changes:62070

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Mon, 29 Jun 2020 11:08:46 +0900 (JST)
Subject: [ruby-changes:62070] 2bd0f37e2b (master): glob_opendir: move cleanup codes at the end

https://git.ruby-lang.org/ruby.git/commit/?id=2bd0f37e2b

From 2bd0f37e2bb5300991b2b497b57446a115904ee1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Thu, 25 Jun 2020 10:26:34 +0900
Subject: glob_opendir: move cleanup codes at the end

Nobu likes this arrangement.

diff --git a/dir.c b/dir.c
index 9c9d40d..9571108 100644
--- a/dir.c
+++ b/dir.c
@@ -2225,12 +2225,12 @@ glob_opendir(ruby_glob_entries_t *ent, DIR *dirp, int flags, rb_encoding *enc) https://github.com/ruby/ruby/blob/trunk/dir.c#L2225
         ruby_qsort(ent->sort.entries, ent->sort.count, sizeof(ent->sort.entries[0]),
                    glob_sort_cmp, NULL);
         return ent;
-
-      nomem:
-        glob_dir_finish(ent, 0);
-        closedir(dirp);
-        return NULL;
     }
+
+  nomem:
+    glob_dir_finish(ent, 0);
+    closedir(dirp);
+    return NULL;
 }
 
 static rb_dirent_t *
-- 
cgit v0.10.2


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

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