git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofp-errors: Fix typos in comment.
[sliver-openvswitch.git]
/
lib
/
netlink-socket.c
diff --git
a/lib/netlink-socket.c
b/lib/netlink-socket.c
index
392bcf5
..
fbb1724
100644
(file)
--- a/
lib/netlink-socket.c
+++ b/
lib/netlink-socket.c
@@
-59,8
+59,7
@@
static void log_nlmsg(const char *function, int error,
\f
/* Netlink sockets. */
\f
/* Netlink sockets. */
-struct nl_sock
-{
+struct nl_sock {
int fd;
uint32_t next_seq;
uint32_t pid;
int fd;
uint32_t next_seq;
uint32_t pid;
@@
-111,10
+110,7
@@
nl_sock_create(int protocol, struct nl_sock **sockp)
}
*sockp = NULL;
}
*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) {
sock->fd = socket(AF_NETLINK, SOCK_RAW, protocol);
if (sock->fd < 0) {