mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
const: suffixes
This commit is contained in:
parent
0e5250c475
commit
9cf127b429
@ -566,7 +566,7 @@ static int _size_arg(struct cmd_context *cmd __attribute__((unused)),
|
||||
{
|
||||
char *ptr;
|
||||
int i;
|
||||
static const char *suffixes = "kmgtpebs";
|
||||
static const char _suffixes[] = "kmgtpebs";
|
||||
char *val;
|
||||
double v;
|
||||
uint64_t v_tmp, adjustment;
|
||||
@ -626,8 +626,8 @@ static int _size_arg(struct cmd_context *cmd __attribute__((unused)),
|
||||
return 0;
|
||||
}
|
||||
} else if (*ptr) {
|
||||
for (i = strlen(suffixes) - 1; i >= 0; i--)
|
||||
if (suffixes[i] == tolower((int) *ptr))
|
||||
for (i = sizeof(_suffixes) - 1; i >= 0; --i)
|
||||
if (_suffixes[i] == tolower((int) *ptr))
|
||||
break;
|
||||
|
||||
if (i < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user