1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Constified

This commit is contained in:
Nobuyoshi Nakada 2019-12-01 19:29:04 +09:00
parent 91af5542b5
commit cb760f36aa
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

4
mjit.c
View file

@ -702,7 +702,7 @@ start_worker(void)
// There's no strndup on Windows
static char*
ruby_strndup(char *str, size_t n)
ruby_strndup(const char *str, size_t n)
{
char *ret = xmalloc(n + 1);
memcpy(ret, str, n);
@ -713,7 +713,7 @@ ruby_strndup(char *str, size_t n)
// Convert "foo bar" to {"foo", "bar", NULL} array. Caller is responsible for
// freeing a returned buffer and its elements.
static char **
split_flags(char *flags)
split_flags(const char *flags)
{
char *buf[MAXPATHLEN];
int i = 0;