xmalloc never returns NULL

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2018-02-13 00:03:18 +00:00
parent e6337582d3
commit c8a5126d50

3
mjit.c
View File

@ -298,8 +298,7 @@ form_args(int num, ...)
len += args_len(args);
}
va_end(argp);
if ((res = xmalloc((len + 1) * sizeof(char *))) == NULL)
return NULL;
res = xmalloc((len + 1) * sizeof(char *));
for (i = disp = 0; i < num; i++) {
args = va_arg(argp2, char **);
len = args_len(args);