]> git.ipfire.org Git - thirdparty/git.git/blobdiff - remote-curl.c
test-lib: parse command line options earlier
[thirdparty/git.git] / remote-curl.c
index fb28309e850518018667dc746c630acc1f497981..1220dffcdc57a17476fb2021db5fb1605857ab80 100644 (file)
@@ -178,7 +178,7 @@ static int set_option(const char *name, const char *value)
                options.no_dependents = 1;
                return 0;
        } else if (!strcmp(name, "filter")) {
-               options.filter = xstrdup(value);;
+               options.filter = xstrdup(value);
                return 0;
        } else {
                return 1 /* unsupported */;
@@ -617,10 +617,11 @@ static int probe_rpc(struct rpc_state *rpc, struct slot_results *results)
        return err;
 }
 
-static curl_off_t xcurl_off_t(ssize_t len) {
-       if (len > maximum_signed_value_of_type(curl_off_t))
+static curl_off_t xcurl_off_t(size_t len) {
+       uintmax_t size = len;
+       if (size > maximum_signed_value_of_type(curl_off_t))
                die("cannot handle pushes this big");
-       return (curl_off_t) len;
+       return (curl_off_t)size;
 }
 
 static int post_rpc(struct rpc_state *rpc)