summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keygen.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/keygen.c b/keygen.c
index 7e49a85..f3793ea 100644
--- a/keygen.c
+++ b/keygen.c
@@ -9,6 +9,7 @@ int main(int argc, char* argv[]) {
char* output;
int defout = 0;
int defbyte = 0;
+ int noopts = 0;
while ((opt = getopt(argc, argv, "b:o:")) != -1) {
switch (opt) {
case 'b':
@@ -23,8 +24,14 @@ int main(int argc, char* argv[]) {
fprintf(stderr, "Usage: %s [-b nbytes] [-o output] \n", argv[0]);
exit(EXIT_FAILURE);
}
+ if (noopts == 0) {
+ noopts = 1;
+ }
}
+ if(noopts == 0) {
+ printf("WARNING no option specified usign default values... \n");
+ }
if (nbytes < 0) {
printf("Negative byte value inserted! \n");
printf("Exiting... \n");