diff options
| author | Jan Sucan <jan@jansucan.com> | 2020-12-24 11:30:06 +0100 |
|---|---|---|
| committer | Jan Sucan <jan@jansucan.com> | 2020-12-24 11:30:06 +0100 |
| commit | 42c87a3dd2b926905db944ab7637d74db0d88ae6 (patch) | |
| tree | bb7614455f09eee44b21f6b10d0f44a4de6c6523 /options.c | |
| parent | 6ea7dffe9afcb9531fbf20c66718801d9805d940 (diff) | |
Remove trailing whitespaces
Diffstat (limited to 'options.c')
| -rw-r--r-- | options.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -17,11 +17,11 @@ int options_parse(int argc, char ** argv, options_t * const opts) { options_init(opts); - + int ch; char * arg_sector_size = NULL; char * arg_buffer_size = NULL; - + while ((ch = getopt(argc, argv, ":s:b:h")) != -1) { switch(ch) { case 's': @@ -35,11 +35,11 @@ options_parse(int argc, char ** argv, options_t * const opts) case 'h': opts->help = true; break; - + case ':': print_error("missing argument for option '-%c'", optopt); return 1; - + default: print_error("unknown option '-%c'", optopt); return 1; @@ -63,11 +63,11 @@ options_parse(int argc, char ** argv, options_t * const opts) if ((arg_sector_size != NULL) && options_parse_unsigned(arg_sector_size, &(opts->sector_size))) { print_error("incorrect sector size"); - return 1; + return 1; } else if ((arg_buffer_size != NULL) && options_parse_unsigned(arg_buffer_size, &(opts->buffer_size))) { print_error("incorrect buffer size"); - return 1; + return 1; } else if (opts->sector_size == 0) { print_error("sector size cannot be 0"); return 1; |
