diff options
author | David Kalnischkies <david@kalnischkies.de> | 2017-12-13 21:39:16 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2017-12-13 23:53:41 +0100 |
commit | 1adcf56bec7d2127d83aa423916639740fe8e586 (patch) | |
tree | 39802989990796e903d8e670b07408380b117c21 /methods | |
parent | 957381a0d26ec11a172ebfc64f892d1b31f0c193 (diff) |
avoid some useless casts reported by -Wuseless-cast
The casts are useless, but the reports show some where we can actually
improve the code by replacing them with better alternatives like
converting whatever int type into a string instead of casting to a
specific one which might in the future be too small.
Reported-By: gcc -Wuseless-cast
Diffstat (limited to 'methods')
-rw-r--r-- | methods/basehttp.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/methods/basehttp.cc b/methods/basehttp.cc index b4c9cc5ed..c77ab28c6 100644 --- a/methods/basehttp.cc +++ b/methods/basehttp.cc @@ -191,7 +191,7 @@ bool RequestState::HeaderLine(string const &Line) /*{{{*/ ; // we got the expected filesize which is all we wanted else if (sscanf(Val.c_str(),"bytes %llu-%*u/%llu",&StartPos,&TotalFileSize) != 2) return _error->Error(_("The HTTP server sent an invalid Content-Range header")); - if ((unsigned long long)StartPos > TotalFileSize) + if (StartPos > TotalFileSize) return _error->Error(_("This HTTP server has broken range support")); // figure out what we will download |