1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

command: return proper unsigned value

Use better 'unsigned' value, so we don't have any 'casting' troubles.
This commit is contained in:
Zdenek Kabelac 2024-05-24 20:43:44 +02:00
parent 73298635b9
commit 5173b0c222

View File

@ -421,12 +421,12 @@ static unsigned _find_lvm_command_enum(const char *name)
return middle;
}
return -1;
return LVM_COMMAND_COUNT;
}
const struct command_name *find_command_name(const char *name)
{
int r = _find_lvm_command_enum(name);
unsigned r = _find_lvm_command_enum(name);
return (r < LVM_COMMAND_COUNT) ? &command_names[r] : NULL;
}