projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'x86-mpx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git]
/
arch
/
mips
/
fw
/
lib
/
cmdline.c
diff --git
a/arch/mips/fw/lib/cmdline.c
b/arch/mips/fw/lib/cmdline.c
index ffd0345780ae246d66b46f60961154806493a1bd..6ecda64ad18423f5e27e22cf9ccf8786a5062cac 100644
(file)
--- a/
arch/mips/fw/lib/cmdline.c
+++ b/
arch/mips/fw/lib/cmdline.c
@@
-68,7
+68,7
@@
char *fw_getenv(char *envname)
result = fw_envp(index + 1);
break;
} else if (fw_envp(index)[i] == '=') {
result = fw_envp(index + 1);
break;
} else if (fw_envp(index)[i] == '=') {
- result =
(fw_envp(index + 1) + i)
;
+ result =
fw_envp(index) + i + 1
;
break;
}
}
break;
}
}
@@
-88,13
+88,13
@@
unsigned long fw_getenvl(char *envname)
{
unsigned long envl = 0UL;
char *str;
{
unsigned long envl = 0UL;
char *str;
- long val;
int tmp;
str = fw_getenv(envname);
if (str) {
int tmp;
str = fw_getenv(envname);
if (str) {
- tmp = kstrtol(str, 0, &val);
- envl = (unsigned long)val;
+ tmp = kstrtoul(str, 0, &envl);
+ if (tmp)
+ envl = 0;
}
return envl;
}
return envl;