Skip to content

Commit 894221d

Browse files
ttaylorrgitster
authored andcommitted
http.c: remove unnecessary casts to long
When parsing 'http.lowSpeedLimit' and 'http.lowSpeedTime', we explicitly cast the result of 'git_config_int()' to a long before assignment. This cast has been in place since all the way back in 58e60dd (Add support for pushing to a remote repository using HTTP/DAV, 2005-11-02). But that cast has always been unnecessary, since long is guaranteed to be at least as wide as int. Let's drop the cast accordingly. Noticed-by: Patrick Steinhardt <[email protected]> Signed-off-by: Taylor Blau <[email protected]> Acked-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 683c54c commit 894221d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

http.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,11 @@ static int http_options(const char *var, const char *value,
438438
return 0;
439439
}
440440
if (!strcmp("http.lowspeedlimit", var)) {
441-
curl_low_speed_limit = (long)git_config_int(var, value, ctx->kvi);
441+
curl_low_speed_limit = git_config_int(var, value, ctx->kvi);
442442
return 0;
443443
}
444444
if (!strcmp("http.lowspeedtime", var)) {
445-
curl_low_speed_time = (long)git_config_int(var, value, ctx->kvi);
445+
curl_low_speed_time = git_config_int(var, value, ctx->kvi);
446446
return 0;
447447
}
448448

0 commit comments

Comments
 (0)