diff --git a/client/emv/emv_pk.c b/client/emv/emv_pk.c index 7b8cdd233..f78997f5a 100644 --- a/client/emv/emv_pk.c +++ b/client/emv/emv_pk.c @@ -43,7 +43,7 @@ static ssize_t emv_pk_read_bin(char *buf, unsigned char *bin, size_t size, size_t *read) { size_t left = size; char *p = buf; - while (*p != 0 && *p == ' ') + while (p != NULL && *p == ' ') p++; while (left > 0) { @@ -70,7 +70,7 @@ static ssize_t emv_pk_read_bin(char *buf, unsigned char *bin, size_t size, size_ return -(p - buf); } - while (*p != 0 && *p == ' ') + while (p != NULL && *p == ' ') p++; p--; @@ -85,7 +85,7 @@ static ssize_t emv_pk_read_ymv(char *buf, unsigned *ymv) { *ymv = 0; - while (*p != 0 && *p == ' ') + while (p != NULL && *p == ' ') p++; for (i = 0; i < 3; i++) { @@ -101,7 +101,7 @@ static ssize_t emv_pk_read_ymv(char *buf, unsigned *ymv) { temp[i] = (c1 * 16 + c2); } - while (*p != 0 && *p == ' ') + while (p != NULL && *p == ' ') p++; p--; @@ -116,7 +116,7 @@ static ssize_t emv_pk_read_ymv(char *buf, unsigned *ymv) { static ssize_t emv_pk_read_string(char *buf, char *str, size_t size) { char *p = buf; - while (*p != 0 && *p == ' ') + while (p != NULL && *p == ' ') p++; while (size > 1) { @@ -132,7 +132,7 @@ static ssize_t emv_pk_read_string(char *buf, char *str, size_t size) { *str = 0; - while (*p != 0 && *p == ' ') + while (p != NULL && *p == ' ') p++; p--;