Skip to content

Commit 7481f4b

Browse files
gportayelboulangero
authored andcommitted
casync-http: use a constant for long option --rate-limit-bps
This long option does not use a short option (see the optstring in call of getopt_long). Use a constant instead, as it is done in casync-tool.c.
1 parent 95099ff commit 7481f4b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/casync-http.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,10 +680,14 @@ static void help(void) {
680680

681681
static int parse_argv(int argc, char *argv[]) {
682682

683+
enum {
684+
ARG_RATE_LIMIT_BPS = 0x100,
685+
};
686+
683687
static const struct option options[] = {
684688
{ "help", no_argument, NULL, 'h' },
685689
{ "verbose", no_argument, NULL, 'v' },
686-
{ "rate-limit-bps", required_argument, NULL, 'l' },
690+
{ "rate-limit-bps", required_argument, NULL, ARG_RATE_LIMIT_BPS },
687691
{}
688692
};
689693

@@ -720,7 +724,7 @@ static int parse_argv(int argc, char *argv[]) {
720724
arg_verbose = true;
721725
break;
722726

723-
case 'l':
727+
case ARG_RATE_LIMIT_BPS:
724728
arg_rate_limit_bps = strtoll(optarg, NULL, 10);
725729
break;
726730

0 commit comments

Comments
 (0)