aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2011-01-24 16:33:31 +0100
committerKevin Wolf <kwolf@redhat.com>2011-01-31 10:03:00 +0100
commit2be22ca5a8dd96c68ef0e90fd916aa6555ae915b (patch)
tree761f4899e3d6cafadd48b4e58753c146ac60b1a7
parent7eb053494c76bb417f83b6e6784a5dbb27638dba (diff)
strtosz(): Use suffix macros in switch() statement
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--cutils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cutils.c b/cutils.c
index 369a016875..8d562b28ab 100644
--- a/cutils.c
+++ b/cutils.c
@@ -324,26 +324,26 @@ int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix)
}
}
switch (qemu_toupper(d)) {
- case 'B':
+ case STRTOSZ_DEFSUFFIX_B:
mul = 1;
if (mul_required) {
goto fail;
}
break;
- case 'K':
+ case STRTOSZ_DEFSUFFIX_KB:
mul = 1 << 10;
break;
case 0:
if (mul_required) {
goto fail;
}
- case 'M':
+ case STRTOSZ_DEFSUFFIX_MB:
mul = 1ULL << 20;
break;
- case 'G':
+ case STRTOSZ_DEFSUFFIX_GB:
mul = 1ULL << 30;
break;
- case 'T':
+ case STRTOSZ_DEFSUFFIX_TB:
mul = 1ULL << 40;
break;
default: