remote-curl.c: xcurl_off_t is not portable (on 32 bit platfoms)
[gitweb.git] / remote-curl.c
index 99b0bedc6ddc670cad6e74083dc33dc0aa4b595a..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)
@@ -714,7 +715,7 @@ static int post_rpc(struct rpc_state *rpc)
 
        } else if (use_gzip && 1024 < rpc->len) {
                /* The client backend isn't giving us compressed data so
-                * we can try to deflate it ourselves, this may save on.
+                * we can try to deflate it ourselves, this may save on
                 * the transfer time.
                 */
                git_zstream stream;