diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-02-27 01:26:29 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-03-13 13:58:45 +0100 |
commit | 3de8f956d5fcf023ab65f88579cd77121694d872 (patch) | |
tree | 153df3708907edcd74c517c591b905e17a772c01 /methods/http.cc | |
parent | d3e8fbb395f57954acd7a2095f02ce530a05ec6a (diff) |
StartPos is always positive for http/https
server.cc: In member function ‘bool ServerState::HeaderLine(std::string)’:
server.cc:198:72: warning: format ‘%llu’ expects argument of type ‘long long unsigned int*’, but argument 3 has type ‘long long int*’ [-Wformat=]
else if (sscanf(Val.c_str(),"bytes %llu-%*u/%llu",&StartPos,&Size) != 2)
Git-Dch: Ignore
Reported-By: gcc -Wpedantic
Diffstat (limited to 'methods/http.cc')
-rw-r--r-- | methods/http.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/methods/http.cc b/methods/http.cc index 16c6d19e1..e1bb2e130 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -484,13 +484,8 @@ bool HttpServerState::InitHashes(FileFd &File) /*{{{*/ In.Hash = new Hashes; // Set the expected size and read file for the hashes - if (StartPos >= 0) - { - File.Truncate(StartPos); - - return In.Hash->AddFD(File, StartPos); - } - return true; + File.Truncate(StartPos); + return In.Hash->AddFD(File, StartPos); } /*}}}*/ Hashes * HttpServerState::GetHashes() /*{{{*/ |