const char *proto_name,
bool (* parser) (const char *, const void *, int, const unsigned long))
{
- static char buf[8192];
+ static long buf[8192 / sizeof(long)];
struct sockaddr_nl nladdr = {
.nl_family = AF_NETLINK
};
tprintf("->%u", peer);
if (path_len) {
if (path[0] == '\0') {
- char *outstr = alloca(4 * path_len - 1);
- string_quote(path + 1, outstr, -1, path_len);
- tprintf(",@%s", outstr);
+ tprints(",@");
+ print_quoted_string(path + 1, path_len,
+ QUOTE_0_TERMINATED);
} else {
- char *outstr = alloca(4 * path_len + 3);
- string_quote(path, outstr, -1, path_len + 1);
- tprintf(",%s", outstr);
+ tprints(",");
+ print_quoted_string(path, path_len + 1,
+ QUOTE_0_TERMINATED);
}
}
tprints("]");