mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-11-03 08:23:47 +00:00
refine #269
This commit is contained in:
@@ -37,11 +37,7 @@ static char *to_string(const json_value *value)
|
||||
if (value->type == json_string) {
|
||||
return ss_strndup(value->u.string.ptr, value->u.string.length);
|
||||
} else if (value->type == json_integer) {
|
||||
#ifdef __MINGW32__
|
||||
return strdup(ss_itoa(value->u.integer));
|
||||
#else
|
||||
return strdup(itoa(value->u.integer));
|
||||
#endif
|
||||
} else if (value->type == json_null) {
|
||||
return "null";
|
||||
} else {
|
||||
|
||||
@@ -61,11 +61,7 @@ void ERROR(const char *s)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
char *ss_itoa(int i)
|
||||
#else
|
||||
char *itoa(int i)
|
||||
#endif
|
||||
{
|
||||
/* Room for INT_DIGITS digits, - and '\0' */
|
||||
static char buf[INT_DIGITS + 2];
|
||||
|
||||
+1
-3
@@ -164,15 +164,13 @@ extern int use_syslog;
|
||||
#endif
|
||||
#define ERROR(s) ss_error(s)
|
||||
|
||||
char *ss_itoa(int i);
|
||||
|
||||
#else
|
||||
|
||||
void ERROR(const char *s);
|
||||
char *itoa(int i);
|
||||
|
||||
#endif
|
||||
|
||||
char *ss_itoa(int i);
|
||||
int run_as(const char *user);
|
||||
void FATAL(const char *msg);
|
||||
void usage(void);
|
||||
|
||||
Reference in New Issue
Block a user