diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-01-16 18:48:15 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-01-16 18:48:15 +1300 |
commit | f49416fb25710f6a1c6cb0d927087b2cb5e28305 (patch) | |
tree | 2446f91287137200f15d42273d017d755236c2e6 /crypt.c | |
parent | Adjust indentation of switch block (diff) | |
download | crypt-f49416fb25710f6a1c6cb0d927087b2cb5e28305.tar.gz crypt-f49416fb25710f6a1c6cb0d927087b2cb5e28305.zip |
Add braces around single-statement if blocks
Diffstat (limited to 'crypt.c')
-rw-r--r-- | crypt.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |