X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/e5e85283a99a834bc495f29598cc3d138d7a9696..b20830b338da114c6248726d15c2d15ed09fee91:/options.c diff --git a/options.c b/options.c index 954719d6..fc8d6056 100644 --- a/options.c +++ b/options.c @@ -756,7 +756,7 @@ static OFF_T parse_size_arg(char **size_arg, char def_suf) OFF_T num = size; *s = '\0'; while (num) { - *--s = (num % 10) + '0'; + *--s = (char)(num % 10) + '0'; num /= 10; } if (!(*size_arg = strdup(s))) @@ -1246,12 +1246,8 @@ int parse_arguments(int *argc, const char ***argv, int frommain) if (!*backup_dir) goto options_rejected; clean_fname(backup_dir, 1); - if (check_filter(elp, backup_dir, 1) < 0) { - options_rejected: - snprintf(err_buf, sizeof err_buf, - "Your options have been rejected by the server.\n"); - return 0; - } + if (check_filter(elp, backup_dir, 1) < 0) + goto options_rejected; } } @@ -1457,6 +1453,11 @@ int parse_arguments(int *argc, const char ***argv, int frommain) am_starting_up = 0; return 1; + + options_rejected: + snprintf(err_buf, sizeof err_buf, + "Your options have been rejected by the server.\n"); + return 0; }