treewide: align function naming
[project/odhcpd.git] / src / dhcpv4.c
index a4b6030..bfe70cb 100644 (file)
@@ -58,13 +58,13 @@ struct odhcpd_ref_ip {
 };
 
 /* Create socket and register events */
-int init_dhcpv4(void)
+int dhcpv4_init(void)
 {
        uloop_timeout_set(&valid_until_timeout, 1000);
        return 0;
 }
 
-int setup_dhcpv4_interface(struct interface *iface, bool enable)
+int dhcpv4_setup_interface(struct interface *iface, bool enable)
 {
        if (iface->dhcpv4_event.uloop.fd > 0) {
                uloop_fd_delete(&iface->dhcpv4_event.uloop);
@@ -354,7 +354,7 @@ void dhcpv4_addr_update(struct interface *iface)
        struct dhcpv4_assignment *c;
        uint32_t mask = iface->dhcpv4_mask.s_addr;
 
-       memset(&ip, sizeof(ip), 0);
+       memset(&ip, 0, sizeof(ip));
        ip.addr.in = iface->dhcpv4_local;
        ip.prefix = odhcpd_netmask2bitlen(false, &iface->dhcpv4_mask);
        ip.broadcast = iface->dhcpv4_bcast;