* A lookup of the name arg was successful in finding arg_vgid_lookup,
* but that resulting vgid doesn't match the arg_vgid.
*/
- if (arg_vgid_lookup && arg_vgid && strcmp(arg_vgid_lookup, arg_vgid)) {
+ if (arg_vgid_lookup && strcmp(arg_vgid_lookup, arg_vgid)) {
if (arg_name_lookup) {
/*
* This shouldn't happen.
* A lookup of the vgid arg was successful in finding arg_name_lookup,
* but that resulting name doesn't match the arg_name.
*/
- if (arg_name_lookup && arg_name && strcmp(arg_name_lookup, arg_name)) {
+ if (arg_name_lookup && strcmp(arg_name_lookup, arg_name)) {
if (arg_vgid_lookup) {
/*
* This shouldn't happen.
* An existing VG has unchanged name and vgid.
*/
if (!new_vgid && !new_name) {
- if (strcmp(arg_name_lookup, arg_name)) {
+ if (arg_name_lookup && strcmp(arg_name_lookup, arg_name)) {
/* This shouldn't happen. */
ERROR(s, "update_metadata arg_vgid %s arg_name %s mismatch arg_name_lookup %s",
arg_vgid, arg_name, arg_name_lookup);
goto update;
}
- if (strcmp(arg_vgid_lookup, arg_vgid)) {
+ if (arg_vgid_lookup && strcmp(arg_vgid_lookup, arg_vgid)) {
/*
* This shouldn't usually happen, but could when
* disks are moved (or filters are changed?)