diff options
author | Luca Boccassi <bluca@debian.org> | 2024-01-04 12:55:51 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2024-01-04 14:30:20 +0100 |
commit | 1323a222d2ba3e1774477f381d8c3ea6aaa573ec (patch) | |
tree | 8013475868f7cc281cae619d8d3ce32f86e90a50 | |
parent | udev: add upper bound of 5 hours to SYSTEMD_UDEV_EXTRA_TIMEOUT_SEC= (diff) | |
download | systemd-1323a222d2ba3e1774477f381d8c3ea6aaa573ec.tar.xz systemd-1323a222d2ba3e1774477f381d8c3ea6aaa573ec.zip |
sd-dhcp-client: add assert_not_reached in switch case
Tell static analysis that r is always initialised
Follow-up for 1809132064d2fd3479e316b615cd05698984852c
CID#1533109
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client-id.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client-id.c b/src/libsystemd-network/sd-dhcp-client-id.c index 6feec25adf..da5fcaa450 100644 --- a/src/libsystemd-network/sd-dhcp-client-id.c +++ b/src/libsystemd-network/sd-dhcp-client-id.c @@ -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; |