lkml.org 
[lkml]   [2010]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5/5] staging:ti dspbridge: replace simple_strtoul by strict_strtoul
    Date
    Replace simple_strtoul by strict_strtoul in atoi function.

    Signed-off-by: Ernesto Ramos <ernesto@ti.com>
    ---
    drivers/staging/tidspbridge/rmgr/dbdcd.c | 6 +++++-
    1 files changed, 5 insertions(+), 1 deletions(-)

    diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
    index cceceb9..b96aea7 100644
    --- 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;
    }

    /*
    --
    1.5.4.5


    \
     
     \ /
      Last update: 2010-07-28 16:39    [W:2.727 / U:0.108 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site