aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-02-01 01:30:30 +1300
committerTom Ryder <tom@sanctum.geek.nz>2020-02-01 01:30:30 +1300
commitc4b4ac4c075d498c2ca3606ee920407a4d556b52 (patch)
tree3ca4b892aea518448e805776ab953aff5099afe8
parentUse a manual check in lieu of an assert (diff)
downloadcrypt-c4b4ac4c075d498c2ca3606ee920407a4d556b52.tar.gz
crypt-c4b4ac4c075d498c2ca3606ee920407a4d556b52.zip
Cast variable for comparison
-rw-r--r--crypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypt.c b/crypt.c
index c30672f..592869e 100644
--- a/crypt.c
+++ b/crypt.c
@@ -53,7 +53,7 @@ int main(int argc, char **argv)
if ((printed = printf("%s\n", hash)) < 0) {
error(strerror(errno));
}
- if (printed != strlen(hash) + 1) { /* +1 for newline */
+ if ((unsigned) printed < strlen(hash) + 1) { /* +1 for newline */
error("Incomplete print");
}