diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-02-01 01:26:45 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-02-01 01:26:45 +1300 |
commit | 9c30a8423dea749f8959ec03def4a8396c430b91 (patch) | |
tree | 7a42714713818eceda874d758d5cf898f59495dd /crypt.c | |
parent | Remove stray space after function name (diff) | |
download | crypt-9c30a8423dea749f8959ec03def4a8396c430b91.tar.gz crypt-9c30a8423dea749f8959ec03def4a8396c430b91.zip |
Use a manual check in lieu of an assert
Diffstat (limited to 'crypt.c')
-rw-r--r-- | crypt.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); } |