]> git.ipfire.org Git - thirdparty/git.git/commit
http.c: remove unnecessary casts to long
authorTaylor Blau <me@ttaylorr.com>
Wed, 19 Mar 2025 22:23:46 +0000 (18:23 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Mar 2025 08:38:27 +0000 (01:38 -0700)
commit894221d2af0e2d218c5ce0a9e8246eadd3710fc7
treeec51238f97afc6e2dbe9c5d557a64a7694be186f
parent683c54c999c301c2cd6f715c411407c413b1d84e
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>
http.c