diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-07-14 22:12:33 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-07-14 22:12:59 +0900 |
commit | 7ac7685fa7a266e74102ac8ed067035ebfebe6e6 (patch) | |
tree | 24ecea3457c6a16e2eea68ab86c6cf9bc45892e5 /mjit_worker.c | |
parent | b7ec77f3614d7a89a47466f240d53abc0f967d19 (diff) | |
download | ruby-7ac7685fa7a266e74102ac8ed067035ebfebe6e6.tar.gz |
Simplify link_o_to_so arguments
by C99 compound literal for array and non-constant array initializer
Diffstat (limited to 'mjit_worker.c')
-rw-r--r-- | mjit_worker.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mjit_worker.c b/mjit_worker.c index 44123e28e1..c5df0b7fad 100644 --- a/mjit_worker.c +++ b/mjit_worker.c @@ -1079,9 +1079,7 @@ convert_unit_to_func(struct rb_mjit_unit *unit) #else // splitting .c -> .o step and .o -> .so step, to cache .o files in the future if ((success = compile_c_to_o(c_file, o_file)) != false) { - const char *o_files[2] = { NULL, NULL }; - o_files[0] = o_file; - success = link_o_to_so(o_files, so_file); + success = link_o_to_so((const char *[]){ o_file, NULL }, so_file); // Always set o_file for compaction. The value is also used for lazy deletion. unit->o_file = strdup(o_file); |