]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
local-addresses: call 'assert_not_reached' where appropriate (#31728)
authorSidhuRupinder <158014905+SidhuRupinder@users.noreply.github.com>
Wed, 13 Mar 2024 05:16:46 +0000 (10:46 +0530)
committerGitHub <noreply@github.com>
Wed, 13 Mar 2024 05:16:46 +0000 (13:16 +0800)
Added code for calling the 'assert_not_reached' function as the value of the 'family' parameter must be either 'AF_INET' or 'AF_INET6'.

src/shared/local-addresses.c

index 842156fcfc32722516ea718517fe2955a56ad7c9..5d5435f54b52fcd392817d078a2d96d7a4d8d96a 100644 (file)
@@ -211,7 +211,7 @@ int local_addresses(
                         break;
 
                 default:
-                        continue;
+                        assert_not_reached();
                 }
 
                 r = add_local_address(&list, &n_list, ifi, scope, family, &a);