hv: remove the usage of 'atoi()'

this function is not from libc but has the same name,
  atoi() in libc is unbounded and not safe.

  replace this function with 'strtol_deci()' in this case.

Tracked-On: #2187
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yonghua Huang
2018-12-26 18:14:25 +08:00
committed by wenlingz
parent 3ca1a583de
commit b6603015bc
3 changed files with 8 additions and 14 deletions

View File

@@ -157,11 +157,6 @@ uint64_t strtoul_hex(const char *nptr)
return acc;
}
int32_t atoi(const char *str)
{
return (int32_t)strtol_deci(str);
}
char *strchr(char *s_arg, char ch)
{
char *s = s_arg;