]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp-client: add assert_not_reached in switch case 30743/head
authorLuca Boccassi <bluca@debian.org>
Thu, 4 Jan 2024 11:55:51 +0000 (12:55 +0100)
committerLuca Boccassi <bluca@debian.org>
Thu, 4 Jan 2024 13:30:20 +0000 (14:30 +0100)
Tell static analysis that r is always initialised

Follow-up for 1809132064d2fd3479e316b615cd05698984852c

CID#1533109

src/libsystemd-network/sd-dhcp-client-id.c

index 6feec25adf08ea891a79ebb5b666f582f00ceb6e..da5fcaa450b635c9ec7d6fb6b48e5a524955f4bb 100644 (file)
@@ -135,6 +135,8 @@ int sd_dhcp_client_id_to_string(const sd_dhcp_client_id *client_id, char **ret)
                         r = asprintf(&t, "IAID:0x%x/DUID", iaid);
                 }
                 break;
+        default:
+                assert_not_reached();
         }
         if (r < 0)
                 return -ENOMEM;