Splinted files and corrected splint errors.

This commit is contained in:
skarg
2011-08-17 03:59:31 +00:00
parent 8d9b987064
commit 61f0a0211d
4 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -519,11 +519,11 @@ static const char trailingBytesForUTF8[256] = {
it's hard to know how many characters there are! */
static int utf8_isvalid(
const char *str,
int length)
size_t length)
{
const unsigned char *p, *pend = (unsigned char *) str + length;
unsigned char c;
int ab;
size_t ab;
for (p = (unsigned char *) str; p < pend; p++) {
c = *p;
@@ -538,7 +538,7 @@ static int utf8_isvalid(
if ((c & 0xc0) != 0xc0) {
return 0;
}
ab = trailingBytesForUTF8[c];
ab = (size_t)trailingBytesForUTF8[c];
if (length < ab) {
return 0;
}
+2 -2
View File
@@ -58,7 +58,7 @@ int wpm_decode_object_id(
} else
return -1;
return len;
return (int)len;
}
@@ -102,7 +102,7 @@ int wpm_decode_object_property(
if ((tag_number == 2) && (decode_is_opening_tag(&apdu[len - 1]))) {
len--;
wp_data->application_data_len =
bacapp_data_len(&apdu[len], apdu_len - len,
bacapp_data_len(&apdu[len], (unsigned)(apdu_len - len),
wp_data->object_property);
len++;