From 5f7cbf3ca9e887870b016414bbbc835efebe5a18 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 16 Dec 2018 17:37:59 +0000 Subject: [PATCH] less use of MIO_MT --- mio/lib/main.c | 4 ++-- mio/lib/mio-pro.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mio/lib/main.c b/mio/lib/main.c index 991954f..daf4a71 100644 --- a/mio/lib/main.c +++ b/mio/lib/main.c @@ -683,8 +683,8 @@ int main () memset (&tcp_bind, 0, MIO_SIZEOF(tcp_bind)); mio_sckaddr_initforip4 (&tcp_bind.localaddr, 1235, MIO_NULL); tcp_bind.options = MIO_DEV_SCK_BIND_REUSEADDR | /*MIO_DEV_SCK_BIND_REUSEPORT |*/ MIO_DEV_SCK_BIND_SSL; - tcp_bind.ssl_certfile = MIO_MT("localhost.crt"); - tcp_bind.ssl_keyfile = MIO_MT("localhost.key"); + tcp_bind.ssl_certfile = "localhost.crt"; + tcp_bind.ssl_keyfile = "localhost.key"; mio_inittime (&tcp_bind.accept_tmout, 5, 1); if (mio_dev_sck_bind (tcp[2],&tcp_bind) <= -1) diff --git a/mio/lib/mio-pro.c b/mio/lib/mio-pro.c index 124edec..5261a9a 100644 --- a/mio/lib/mio-pro.c +++ b/mio/lib/mio-pro.c @@ -76,8 +76,8 @@ static int make_param (mio_t* mio, const mio_bch_t* cmd, int flags, param_t* par mcmd = (mio_bch_t*)cmd; param->argv = param->fixed_argv; - param->argv[0] = MIO_MT("/bin/sh"); - param->argv[1] = MIO_MT("-c"); + param->argv[0] = "/bin/sh"; + param->argv[1] = "-c"; param->argv[2] = mcmd; param->argv[3] = MIO_NULL; } @@ -90,7 +90,7 @@ static int make_param (mio_t* mio, const mio_bch_t* cmd, int flags, param_t* par mcmd = mio_mbsdup (mio, cmd); if (!mcmd) goto oops; - fcnt = mio_mbsspl (mcmd, MIO_MT(""), MIO_MT('\"'), MIO_MT('\"'), MIO_MT('\\')); + fcnt = mio_mbsspl(mcmd, "", '\"', '\"', '\\'); if (fcnt <= 0) { /* no field or an error */ @@ -116,7 +116,7 @@ static int make_param (mio_t* mio, const mio_bch_t* cmd, int flags, param_t* par for (i = 0; i < fcnt; i++) { param->argv[i] = mcmdptr; - while (*mcmdptr != MIO_MT('\0')) mcmdptr++; + while (*mcmdptr != '\0') mcmdptr++; mcmdptr++; } param->argv[i] = MIO_NULL; @@ -200,9 +200,9 @@ static pid_t standard_fork_and_exec (mio_t* mio, int pfds[], int flags, param_t* (flags & MIO_DEV_PRO_ERRTONUL)) { #if defined(O_LARGEFILE) - devnull = open (MIO_MT("/dev/null"), O_RDWR | O_LARGEFILE, 0); + devnull = open ("/dev/null", O_RDWR | O_LARGEFILE, 0); #else - devnull = open (MIO_MT("/dev/null"), O_RDWR, 0); + devnull = open ("/dev/null", O_RDWR, 0); #endif if (devnull == MIO_SYSHND_INVALID) goto slave_oops; }