time.c: fix compile errors in `mrb_time_asctime()`.

parent 18738412
......@@ -694,14 +694,13 @@ mrb_time_asctime(mrb_state *mrb, mrb_value self)
int len;
#if defined(MRB_NO_STDIO)
char *s;
# ifdef NO_ASCTIME_R
s = asctime(d);
char *buf = asctime(d);
# else
char buf[32];
char buf[32], *s;
s = asctime_r(d, buf);
# endif
len = strlen(s)-1; /* truncate the last newline */
len = strlen(buf)-1; /* truncate the last newline */
#else
char buf[256];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment