X-Git-Url: https://git.cryptolib.org/?p=arm-crypto-lib.git;a=blobdiff_plain;f=test_src%2Fcmacvs.c;h=adb3fad26cd18c2346a281630e9cc01423b35a5e;hp=393d2808d9934974c8a9022f0196294fa11da2ee;hb=fb928c1c4c392b9e987631f84f1027af94e05beb;hpb=3f2f2071c47e2e424af71cc85697f3eb26c24277 diff --git a/test_src/cmacvs.c b/test_src/cmacvs.c index 393d280..adb3fad 100644 --- a/test_src/cmacvs.c +++ b/test_src/cmacvs.c @@ -158,7 +158,7 @@ int32_t getValue(char* key){ if(*str2=='='){ do{ str2++; - }while(*str2 && !isdigit(*str2)); + }while(*str2 && !isdigit((uint8_t)(*str2))); val=(uint32_t)strtoul(str2, NULL, 10); return val; } @@ -322,7 +322,7 @@ void cmacvs_test1(void){ /* Gen tests */ cli_putstr("\r\n"); #endif while((c=cli_getc_cecho())!='M' && c!='m'){ - if(!isspace(c)){ + if(!isspace((uint8_t)c)){ cli_putstr("\r\nERROR: wrong input (1) [0x"); cli_hexdump(&c, 1); cli_putstr("]!\r\n"); @@ -341,7 +341,7 @@ void cmacvs_test1(void){ /* Gen tests */ return; } while((c=cli_getc_cecho())!='='){ - if(!isspace(c)){ + if(!isspace((uint8_t)c)){ cli_putstr("\r\nERROR: wrong input (4)!\r\n"); bcal_cmac_free(&(cmacvs_ctx.ctx)); return; @@ -487,7 +487,7 @@ void cmacvs_test2(void){ /* Ver tests */ cli_putstr("\r\n"); #endif while((c=cli_getc_cecho())!='M' && c!='m'){ - if(!isspace(c)){ + if(!isspace((uint8_t)c)){ cli_putstr("\r\nERROR: wrong input (1) [0x"); cli_hexdump(&c, 1); cli_putstr("]!\r\n"); @@ -506,7 +506,7 @@ void cmacvs_test2(void){ /* Ver tests */ return; } while((c=cli_getc_cecho())!='='){ - if(!isspace(c)){ + if(!isspace((uint8_t)c)){ cli_putstr("\r\nERROR: wrong input (4)!\r\n"); bcal_cmac_free(&(cmacvs_ctx.ctx)); return;