htb: Set required min-rate to mtu not 1500.
[openvswitch] / lib / socket-util.c
index 275bf309a3564826cdf1834c5ff6e426325fb761..e0f34e71409dec627e16f9938b5512f20534e662 100644 (file)
@@ -233,8 +233,7 @@ static void
 make_sockaddr_un__(const char *name, struct sockaddr_un *un, socklen_t *un_len)
 {
     un->sun_family = AF_UNIX;
-    strncpy(un->sun_path, name, sizeof un->sun_path);
-    un->sun_path[sizeof un->sun_path - 1] = '\0';
+    ovs_strzcpy(un->sun_path, name, sizeof un->sun_path);
     *un_len = (offsetof(struct sockaddr_un, sun_path)
                 + strlen (un->sun_path) + 1);
 }