From f49416fb25710f6a1c6cb0d927087b2cb5e28305 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 16 Jan 2020 18:48:15 +1300 Subject: Add braces around single-statement if blocks --- crypt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crypt.c b/crypt.c index e704cfa..457a245 100644 --- a/crypt.c +++ b/crypt.c @@ -22,8 +22,9 @@ int main (int argc, char **argv) * If we don't have three arguments left after processing the options, * exit with usage information and error status */ - if (argc != 3) + if (argc != 3) { usage(stderr, EXIT_FAILURE); + } key = argv[1]; salt = argv[2]; @@ -32,8 +33,9 @@ int main (int argc, char **argv) * Create the hash, but exit immediately with the system error string * if it returns a null pointer (error condition) */ - if (!(hash = crypt(key, salt))) + if (!(hash = crypt(key, salt))) { error(strerror(errno)); + } puts(hash); exit(EXIT_SUCCESS); -- cgit v1.2.3