diff options
| author | Taylor Blau <me@ttaylorr.com> | 2025-03-19 18:23:46 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-21 01:38:27 -0700 |
| commit | 894221d2af0e2d218c5ce0a9e8246eadd3710fc7 (patch) | |
| tree | ec51238f97afc6e2dbe9c5d557a64a7694be186f /http.c | |
| parent | 683c54c999c301c2cd6f715c411407c413b1d84e (diff) | |
| download | git-894221d2af0e2d218c5ce0a9e8246eadd3710fc7.tar.xz | |
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 58e60dd203 (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 <ps@pks.im>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Acked-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.c')
| -rw-r--r-- | http.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -438,11 +438,11 @@ static int http_options(const char *var, const char *value, return 0; } if (!strcmp("http.lowspeedlimit", var)) { - curl_low_speed_limit = (long)git_config_int(var, value, ctx->kvi); + curl_low_speed_limit = git_config_int(var, value, ctx->kvi); return 0; } if (!strcmp("http.lowspeedtime", var)) { - curl_low_speed_time = (long)git_config_int(var, value, ctx->kvi); + curl_low_speed_time = git_config_int(var, value, ctx->kvi); return 0; } |
