\f
/* Netlink sockets. */
-struct nl_sock
-{
+struct nl_sock {
int fd;
uint32_t next_seq;
uint32_t pid;
}
*sockp = NULL;
- sock = malloc(sizeof *sock);
- if (sock == NULL) {
- return ENOMEM;
- }
+ sock = xmalloc(sizeof *sock);
sock->fd = socket(AF_NETLINK, SOCK_RAW, protocol);
if (sock->fd < 0) {