chiark / gitweb /
refcnt: refcnt is unsigned, fix comparisons
[elogind.git] / src / libsystemd-network / sd-dhcp-client.c
index 9b007bf3cd2e8172021fb04efeafb96a3f22e48c..dbecad4d9c6fa0399acd20049d27aaaf67cf1fdb 100644 (file)
@@ -500,7 +500,7 @@ static int client_message_init(sd_dhcp_client *client, DHCPPacket **ret,
 
            Note (from ConnMan): Some DHCP servers will send bigger DHCP packets
            than the defined default size unless the Maximum Messge Size option
-           is explicitely set
+           is explicitly set
 
            RFC3442 "Requirements to Avoid Sizing Constraints":
            Because a full routing table can be quite large, the standard 576
@@ -1672,7 +1672,7 @@ sd_dhcp_client *sd_dhcp_client_ref(sd_dhcp_client *client) {
 }
 
 sd_dhcp_client *sd_dhcp_client_unref(sd_dhcp_client *client) {
-        if (client && REFCNT_DEC(client->n_ref) <= 0) {
+        if (client && REFCNT_DEC(client->n_ref) == 0) {
                 log_dhcp_client(client, "FREE");
 
                 client_initialize(client);