aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-02-01 01:26:45 +1300
committerTom Ryder <tom@sanctum.geek.nz>2020-02-01 01:26:45 +1300
commit9c30a8423dea749f8959ec03def4a8396c430b91 (patch)
tree7a42714713818eceda874d758d5cf898f59495dd
parent85a3ed3aff7430b4231797466a7d4589426e732a (diff)
downloadcrypt-9c30a8423dea749f8959ec03def4a8396c430b91.tar.gz
crypt-9c30a8423dea749f8959ec03def4a8396c430b91.zip
Use a manual check in lieu of an assert
-rw-r--r--crypt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypt.c b/crypt.c
index 8572199..c30672f 100644
--- a/crypt.c
+++ b/crypt.c
@@ -53,7 +53,9 @@ int main(int argc, char **argv)
if ((printed = printf("%s\n", hash)) < 0) {
error(strerror(errno));
}
- assert(printed == strlen(hash) + 1);
+ if (printed != strlen(hash) + 1) { /* +1 for newline */
+ error("Incomplete print");
+ }
exit(EXIT_SUCCESS);
}