[PATCH 7/8] dchpv6: Set err to 0 when client creation succeeds
Jussi Laakkonen <[email protected]> Thu, 10 Apr 2025 18:58:45 +0300
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <[email protected]> |
Fix Clang analyzer warning. Value for "err" was not set when the client creation is successful. --- src/dhcpv6.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 8b683599..a9d2aac9 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -3,6 +3,7 @@ * Connection Manager * * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2025 Jolla Mobile Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -2064,6 +2065,7 @@ static GDHCPClient *create_pd_client(struct connman_dhcpv6 *dhcp, int *err) g_dhcpv6_client_create_iaid(dhcp_client, index, (unsigned char *)&iaid); g_dhcpv6_client_set_iaid(dhcp_client, iaid); + *err = 0; return dhcp_client; } -- 2.39.5