socketutils.c: use xsprintf instead of snprintf
* socketutils.c: Include "xstring.h". (unix_parse_response): Replace snprintf with xsprintf.
This commit is contained in:
parent
1d6274afb4
commit
87f755658b
@ -46,6 +46,8 @@
|
||||
# define UNIX_PATH_MAX sizeof(((struct sockaddr_un *) 0)->sun_path)
|
||||
#endif
|
||||
|
||||
#include "xstring.h"
|
||||
|
||||
typedef struct {
|
||||
unsigned long inode;
|
||||
char *details;
|
||||
@ -310,7 +312,7 @@ unix_parse_response(const void *data, const int data_len,
|
||||
|
||||
char peer_str[3 + sizeof(peer) * 3];
|
||||
if (peer)
|
||||
snprintf(peer_str, sizeof(peer_str), "->%u", peer);
|
||||
xsprintf(peer_str, "->%u", peer);
|
||||
else
|
||||
peer_str[0] = '\0';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user