[pkg-opensc-commit] [libp11] 12/13: Corrected unsigned<=0 checks
Eric Dorland
eric at moszumanska.debian.org
Mon May 22 03:43:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to annotated tag libp11-0.4.5
in repository libp11.
commit bc4caacc8a51993e946755944bed2d2bb9ae06fb
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date: Sat Mar 11 13:13:28 2017 +0100
Corrected unsigned<=0 checks
---
src/eng_parse.c | 2 +-
tests/fork-test.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/eng_parse.c b/src/eng_parse.c
index c9a0687..2114e35 100644
--- a/src/eng_parse.c
+++ b/src/eng_parse.c
@@ -65,7 +65,7 @@ static int hex_to_bin(const char *in, unsigned char *out, size_t *outlen)
}
if (*in == ':')
in++;
- if (left <= 0) {
+ if (left == 0) {
fprintf(stderr, "hex_to_bin(): hex string too long\n");
*outlen = 0;
return 0;
diff --git a/tests/fork-test.c b/tests/fork-test.c
index dd8e2ea..9c3a8e7 100644
--- a/tests/fork-test.c
+++ b/tests/fork-test.c
@@ -125,7 +125,7 @@ loggedin:
fprintf(stderr, "PKCS11_enumerate_certs failed\n");
goto failed;
}
- if (ncerts <= 0) {
+ if (ncerts == 0) {
fprintf(stderr, "no certificates found\n");
goto failed;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git
More information about the pkg-opensc-commit
mailing list