mmsghdr.c: use xsprintf instead of snprintf
* mmsghdr.c: Include "xstring.h". (SYS_FUNC(recvmmsg)): Replace snprintf with xsprintf.
This commit is contained in:
parent
87f755658b
commit
4ba39820f1
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "msghdr.h"
|
#include "msghdr.h"
|
||||||
|
#include "xstring.h"
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -240,8 +241,7 @@ SYS_FUNC(recvmmsg)
|
|||||||
return 0;
|
return 0;
|
||||||
/* timeout on exit */
|
/* timeout on exit */
|
||||||
static char str[sizeof("left") + TIMESPEC_TEXT_BUFSIZE];
|
static char str[sizeof("left") + TIMESPEC_TEXT_BUFSIZE];
|
||||||
snprintf(str, sizeof(str), "left %s",
|
xsprintf(str, "left %s", sprint_timespec(tcp, tcp->u_arg[4]));
|
||||||
sprint_timespec(tcp, tcp->u_arg[4]));
|
|
||||||
tcp->auxstr = str;
|
tcp->auxstr = str;
|
||||||
return RVAL_STR;
|
return RVAL_STR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user