diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-02-01 01:14:11 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-02-01 01:14:11 +1300 |
commit | e372b4dc1142e70b41d55eb157cc137dfd218373 (patch) | |
tree | 30334ea7cc4b7a2bbffc145ebbfc0c3df9ec7d9f /crypt.c | |
parent | Realised there was no need for a separate header (diff) | |
download | crypt-e372b4dc1142e70b41d55eb157cc137dfd218373.tar.gz crypt-e372b4dc1142e70b41d55eb157cc137dfd218373.zip |
Add const decorators
Diffstat (limited to 'crypt.c')
-rw-r--r-- | crypt.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -5,12 +5,12 @@ #include <string.h> /* strerror(3) */ #include <unistd.h> /* crypt(3) */ -void error(char *); +void error(const char *); void usage(FILE *, int); int main (int argc, char **argv) { - char *hash, *key, *salt; + const char *hash, *key, *salt; int opt; while ((opt = getopt(argc, argv, "h")) != -1) { @@ -52,7 +52,7 @@ int main (int argc, char **argv) /* * Exit with error error message */ -void error(char *message) +void error(const char *message) { fprintf(stderr, "%s\n", message); exit(EXIT_FAILURE); @@ -61,7 +61,7 @@ void error(char *message) /* * Show usage to given stream, and exit with given code */ -void usage(FILE *stream, int status) +void usage(FILE *stream, const int status) { fputs("USAGE: crypt [-h | KEY SALT]\n", stream); exit(status); |