diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-12-21 13:58:51 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-12-21 13:58:51 +0000 |
commit | f9396bbfe805c16944fec66ff0c6acdf87ba2ef2 (patch) | |
tree | c8a71a47d746009969a6d588529d28658626c9b2 /xen/common/lib.c | |
parent | 015f6a2832c6304c9eccdbbe09ddb71efb2144d7 (diff) | |
download | xen-f9396bbfe805c16944fec66ff0c6acdf87ba2ef2.tar.gz xen-f9396bbfe805c16944fec66ff0c6acdf87ba2ef2.tar.bz2 xen-f9396bbfe805c16944fec66ff0c6acdf87ba2ef2.zip |
Improve consistency of type-attribute usage (volatile/const).
From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/common/lib.c')
-rw-r--r-- | xen/common/lib.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xen/common/lib.c b/xen/common/lib.c index 0eb58f19d2..c8a90b99a7 100644 --- a/xen/common/lib.c +++ b/xen/common/lib.c @@ -439,11 +439,14 @@ s64 __moddi3(s64 a, s64 b) #endif /* BITS_PER_LONG == 32 */ -unsigned long long parse_size_and_unit(const char *s, char **ps) +unsigned long long parse_size_and_unit(const char *s, const char **ps) { - unsigned long long ret = simple_strtoull(s, (char **)&s, 0); + unsigned long long ret; + const char *s1; - switch (*s) { + ret = simple_strtoull(s, &s1, 0); + + switch (*s1) { case 'G': case 'g': ret <<= 10; case 'M': case 'm': @@ -459,7 +462,7 @@ unsigned long long parse_size_and_unit(const char *s, char **ps) } if (ps != NULL) - *ps = (char *)s; + *ps = s1; return ret; } |