aboutsummaryrefslogtreecommitdiff
path: root/crypt.c
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-04-20 09:32:12 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-04-20 09:32:12 +1200
commit04385944be3476c3a96df34f168687fad539a94b (patch)
tree5b0a26990ac91ee3a48459f61335c54ffc9d35b5 /crypt.c
parentSpecify .PHONY targets (diff)
downloadcrypt-04385944be3476c3a96df34f168687fad539a94b.tar.gz
crypt-04385944be3476c3a96df34f168687fad539a94b.zip
ICO C90 forbids mixed declarations and code
Diffstat (limited to 'crypt.c')
-rw-r--r--crypt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypt.c b/crypt.c
index f4d3a11..8134793 100644
--- a/crypt.c
+++ b/crypt.c
@@ -13,6 +13,9 @@
*/
int main (int argc, char **argv)
{
+ /* The hash we will produce, hopefully */
+ char *hash = NULL;
+
/* Assume user doesn't want help */
int help = 0;
@@ -44,7 +47,7 @@ int main (int argc, char **argv)
}
/* All seems well, build the hash and print it */
- char *hash = crypt(argv[1], argv[2]);
+ hash = crypt(argv[1], argv[2]);
fprintf(stdout, "%s\n", hash);
exit(EXIT_SUCCESS);
}