less use of MIO_MT

This commit is contained in:
hyung-hwan 2018-12-16 17:37:59 +00:00
parent fb0258db6a
commit 5f7cbf3ca9
2 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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;
}