mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 01:50:25 +01:00
coverity: fix various warnings detected with Coverity (fixup)
I missed to implement the remarks from https://bugzilla.redhat.com/show_bug.cgi?id=1025894#c4 Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
97935382f4
commit
709bc90b6b
3 changed files with 9 additions and 3 deletions
|
|
@ -318,7 +318,12 @@ update_connection (NMDevice *device, NMConnection *connection)
|
|||
g_object_set (s_vlan, NM_SETTING_VLAN_INTERFACE_NAME, nm_device_get_iface (device), NULL);
|
||||
}
|
||||
|
||||
(void) nm_platform_vlan_get_info (ifindex, &parent_ifindex, &vlan_id);
|
||||
if (!nm_platform_vlan_get_info (ifindex, &parent_ifindex, &vlan_id)) {
|
||||
nm_log_warn (LOGD_VLAN, "(%s): failed to get VLAN interface info while updating connection.",
|
||||
nm_device_get_iface (device));
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->vlan_id != vlan_id) {
|
||||
priv->vlan_id = vlan_id;
|
||||
g_object_notify (G_OBJECT (device), NM_DEVICE_VLAN_ID);
|
||||
|
|
|
|||
|
|
@ -173,9 +173,10 @@ stop (NMDHCPClient *client, gboolean release, const GByteArray *duid)
|
|||
/* Chain up to parent */
|
||||
NM_DHCP_CLIENT_CLASS (nm_dhcp_dhcpcd_parent_class)->stop (client, release, duid);
|
||||
|
||||
if (priv->pid_file)
|
||||
if (priv->pid_file) {
|
||||
if (remove (priv->pid_file) == -1)
|
||||
nm_log_dbg (LOGD_DHCP, "Could not remove dhcp pid file \"%s\": %d (%s)", priv->pid_file, errno, g_strerror (errno));
|
||||
}
|
||||
|
||||
/* FIXME: implement release... */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ verify_wpa_psk (NMSettingWirelessSecurity *s_wsec,
|
|||
|
||||
n = nm_setting_wireless_security_get_num_pairwise (s_wsec);
|
||||
tmp = (n > 0) ? nm_setting_wireless_security_get_pairwise (s_wsec, 0) : NULL;
|
||||
if (n > 1 || !tmp || strcmp (tmp, "none")) {
|
||||
if (n > 1 || g_strcmp0 (tmp, "none")) {
|
||||
g_set_error_literal (error,
|
||||
NM_SETTING_WIRELESS_SECURITY_ERROR,
|
||||
NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue