HV:lib:add suffix U to the numeric constant

Add suffix U to the numeric constant

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Huihuang Shi
2018-07-04 16:04:54 +08:00
committed by lijinxia
parent d3bd514e58
commit d3ad411c91
3 changed files with 29 additions and 28 deletions

View File

@@ -262,7 +262,7 @@ char *strncpy_s(char *d, size_t dmax, const char *s, size_t slen)
return NULL;
}
if (dmax == 0 || slen == 0) {
if (dmax == 0U || slen == 0U) {
pr_err("%s: invlaid length of src or dest buffer", __func__);
return NULL;
}
@@ -282,7 +282,7 @@ char *strncpy_s(char *d, size_t dmax, const char *s, size_t slen)
return NULL;
}
if (slen == 0) {
if (slen == 0U) {
*d = '\0';
return dest_base;
}
@@ -333,9 +333,9 @@ size_t strnlen_s(const char *str, size_t maxlen)
if (str == NULL)
return 0;
count = 0;
count = 0U;
while ((*str) != 0) {
if (maxlen == 0)
if (maxlen == 0U)
break;
count++;