projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3c8aef
)
staging:ti dspbridge: replace simple_strtoul by strict_strtoul
author
Ernesto Ramos
<ernesto@ti.com>
Wed, 28 Jul 2010 14:40:52 +0000
(09:40 -0500)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 28 Jul 2010 15:22:05 +0000
(08:22 -0700)
Replace simple_strtoul by strict_strtoul in atoi function.
Signed-off-by: Ernesto Ramos <ernesto@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/tidspbridge/rmgr/dbdcd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/tidspbridge/rmgr/dbdcd.c
b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index cceceb93f673e65922fde7a2fab263d1fdd9bf23..b96aea77b809a80a43dee07f9f78c077015032b9 100644
(file)
--- a/
drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/
drivers/staging/tidspbridge/rmgr/dbdcd.c
@@
-1012,6
+1012,8
@@
static s32 atoi(char *psz_buf)
{
char *pch = psz_buf;
s32 base = 0;
+ unsigned long res;
+ int ret_val;
while (isspace(*pch))
pch++;
@@
-1023,7
+1025,9
@@
static s32 atoi(char *psz_buf)
base = 16;
}
- return simple_strtoul(pch, NULL, base);
+ ret_val = strict_strtoul(pch, base, &res);
+
+ return ret_val ? : res;
}
/*