mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-06 17:18:29 +03:00
gcc-fanalyzer: notices 'du' could be NULL
Ensure only nonNULL 'du' pointer is dereference altough the comment to the last assign 'du' pointer already suggest 'NULL' case should not happen. So just being explicit. mer du
This commit is contained in:
parent
834f17bb33
commit
e15d1e53c1
@ -2144,7 +2144,8 @@ void device_ids_find_renamed_devs(struct cmd_context *cmd, struct dm_list *dev_l
|
||||
/* I don't think this would happen */
|
||||
log_warn("WARNING: new device %s for PVID %s does not pass filter %s.",
|
||||
dev_name(dev), dil->pvid, dev_filtered_reason(dev));
|
||||
du->dev = NULL;
|
||||
if (du) /* Should not happen 'du' is NULL */
|
||||
du->dev = NULL;
|
||||
dev->flags &= ~DEV_MATCHED_USE_ID;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user