not null?
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
static ssize_t emv_pk_read_bin(char *buf, unsigned char *bin, size_t size, size_t *read) {
|
static ssize_t emv_pk_read_bin(char *buf, unsigned char *bin, size_t size, size_t *read) {
|
||||||
size_t left = size;
|
size_t left = size;
|
||||||
char *p = buf;
|
char *p = buf;
|
||||||
while (*p != 0 && *p == ' ')
|
while (p != NULL && *p == ' ')
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
while (left > 0) {
|
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);
|
return -(p - buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*p != 0 && *p == ' ')
|
while (p != NULL && *p == ' ')
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
p--;
|
p--;
|
||||||
@@ -85,7 +85,7 @@ static ssize_t emv_pk_read_ymv(char *buf, unsigned *ymv) {
|
|||||||
|
|
||||||
*ymv = 0;
|
*ymv = 0;
|
||||||
|
|
||||||
while (*p != 0 && *p == ' ')
|
while (p != NULL && *p == ' ')
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) {
|
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);
|
temp[i] = (c1 * 16 + c2);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*p != 0 && *p == ' ')
|
while (p != NULL && *p == ' ')
|
||||||
p++;
|
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) {
|
static ssize_t emv_pk_read_string(char *buf, char *str, size_t size) {
|
||||||
char *p = buf;
|
char *p = buf;
|
||||||
while (*p != 0 && *p == ' ')
|
while (p != NULL && *p == ' ')
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
while (size > 1) {
|
while (size > 1) {
|
||||||
@@ -132,7 +132,7 @@ static ssize_t emv_pk_read_string(char *buf, char *str, size_t size) {
|
|||||||
|
|
||||||
*str = 0;
|
*str = 0;
|
||||||
|
|
||||||
while (*p != 0 && *p == ' ')
|
while (p != NULL && *p == ' ')
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
p--;
|
p--;
|
||||||
|
|||||||
Reference in New Issue
Block a user