]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/blobdiff - lib/libnetlink.c
incorrect initialization
[lisovros/iproute2_canprio.git] / lib / libnetlink.c
index 5c6a4dc4b193e7b6da426993809f32eea47a3e0b..555dd5cad4a7ce862448ea753f06b2fea84de859 100644 (file)
@@ -40,7 +40,7 @@ int rtnl_open_byproto(struct rtnl_handle *rth, unsigned subscriptions,
        int sndbuf = 32768;
        int rcvbuf = 32768;
 
-       memset(rth, 0, sizeof(rth));
+       memset(rth, 0, sizeof(*rth));
 
        rth->fd = socket(AF_NETLINK, SOCK_RAW, protocol);
        if (rth->fd < 0) {