hv: string: fix MISRA-C violations related to style

This patch fixes the MISRA-C violations in lib/string.c
 * add the required brackets for logical conjunctions
 * replace the basic type `long` with defined type `int64_t`

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Shiqing Gao
2018-12-20 09:43:40 +08:00
committed by wenlingz
parent 2c6c383e54
commit 32d6aa97f9
2 changed files with 6 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ size_t strnlen_s(const char *str_arg, size_t maxlen_arg);
void *memset(void *base, uint8_t v, size_t n);
void *memcpy_s(void *d, size_t dmax, const void *s, size_t slen);
int32_t atoi(const char *str);
long strtol_deci(const char *nptr);
int64_t strtol_deci(const char *nptr);
uint64_t strtoul_hex(const char *nptr);
char *strstr_s(const char *str1, size_t maxlen1,
const char *str2, size_t maxlen2);