aboutsummaryrefslogtreecommitdiff
path: root/passgen.c
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2021-12-02 19:02:35 +1100
committerNicholas Tay <nick@windblume.net>2021-12-02 19:02:35 +1100
commit6d38a74cad2b49ed38fbe55bdf0d55af78c786a9 (patch)
treefec41f88838492038efee8fa74962e4033ffbea3 /passgen.c
parent22f1a4d6c362db0704459f227163d68d51a5ad56 (diff)
downloadpassgen-6d38a74cad2b49ed38fbe55bdf0d55af78c786a9.tar.gz
passgen-6d38a74cad2b49ed38fbe55bdf0d55af78c786a9.tar.bz2
passgen-6d38a74cad2b49ed38fbe55bdf0d55af78c786a9.zip
Print error messages to stderr instead
Diffstat (limited to 'passgen.c')
-rw-r--r--passgen.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/passgen.c b/passgen.c
index 91d62fd..89361e5 100644
--- a/passgen.c
+++ b/passgen.c
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
int numbers = atoi(argv[3]);
if (triplets < 1) {
- printf("ERROR: Cannot have less than one triplet.");
+ fprintf(stderr, "ERROR: Cannot have less than one triplet.");
return 1;
}
@@ -62,7 +62,6 @@ int main(int argc, char *argv[])
memset(grammar + (triplets * 3), '!', specials);
memset(grammar + (triplets * 3) + specials, '#', numbers);
- //printf("Custom: %s\n", grammar);
custom_grammar = true;
}
@@ -92,7 +91,7 @@ int main(int argc, char *argv[])
switch (c) {
CLASSES
default:
- printf("ERROR: Invalid grammar character '%c'.\n", c);
+ fprintf(stderr, "ERROR: Invalid grammar character '%c'.\n", c);
if (custom_grammar)
free(grammar);
free(password);