mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
72ad081145
commit
9fa4766e14
1 changed files with 3 additions and 4 deletions
7
mjit.c
7
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
|
||||
|
|
Loading…
Reference in a new issue