Commit b190f113 authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix broken const use inside local suffix_strtoul routine.

SGI-PV: 904196
SGI-Modid: xfs-linux-melb:xfs-kern:26201a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 477829ef
...@@ -1654,10 +1654,10 @@ xfs_vget( ...@@ -1654,10 +1654,10 @@ xfs_vget(
#define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */ #define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */
STATIC unsigned long STATIC unsigned long
suffix_strtoul(const char *cp, char **endp, unsigned int base) suffix_strtoul(char *s, char **endp, unsigned int base)
{ {
int last, shift_left_factor = 0; int last, shift_left_factor = 0;
char *value = (char *)cp; char *value = s;
last = strlen(value) - 1; last = strlen(value) - 1;
if (value[last] == 'K' || value[last] == 'k') { if (value[last] == 'K' || value[last] == 'k') {
...@@ -1673,7 +1673,7 @@ suffix_strtoul(const char *cp, char **endp, unsigned int base) ...@@ -1673,7 +1673,7 @@ suffix_strtoul(const char *cp, char **endp, unsigned int base)
value[last] = '\0'; value[last] = '\0';
} }
return simple_strtoul(cp, endp, base) << shift_left_factor; return simple_strtoul((const char *)s, endp, base) << shift_left_factor;
} }
STATIC int STATIC int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment