aboutsummaryrefslogtreecommitdiffstats
path: root/mjit.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-24 06:15:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-24 06:15:43 +0000
commit9fa4766e141a01e74a0276450e295e11a36033a9 (patch)
tree2c224b09283e0745f4e56173b93cd8c690cf8bf0 /mjit.c
parent72ad081145fee3ebd444fbc437f1538d083ded90 (diff)
downloadruby-9fa4766e141a01e74a0276450e295e11a36033a9.tar.gz
mjit.c: use remove_file in clean_so_file too
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mjit.c b/mjit.c
index 7927581ba3..7938751bc7 100644
--- a/mjit.c
+++ b/mjit.c
@@ -216,6 +216,8 @@ VALUE rb_mMJIT;
static char *libruby_pathflag;
#endif
+static void remove_file(const char *filename);
+
/* Return time in milliseconds as a double. */
static double
real_ms_time(void)
@@ -452,10 +454,7 @@ clean_so_file(struct rb_mjit_unit *unit)
char *so_file = unit->so_file;
if (so_file) {
unit->so_file = NULL;
- if (remove(so_file)) {
- fprintf(stderr, "failed to remove \"%s\": %s\n",
- so_file, strerror(errno));
- }
+ remove_file(so_file);
free(so_file);
}
#endif