HCoop
/
ntk
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix various -Wall warnings
[ntk/apt.git]
/
methods
/
http.cc
diff --git
a/methods/http.cc
b/methods/http.cc
index
26d435d
..
b3c791f
100644
(file)
--- a/
methods/http.cc
+++ b/
methods/http.cc
@@
-941,7
+941,8
@@
int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv)
if (Srv->StartPos >= 0)
{
Res.ResumePoint = Srv->StartPos;
- ftruncate(File->Fd(),Srv->StartPos);
+ if (ftruncate(File->Fd(),Srv->StartPos) < 0)
+ _error->Errno("ftruncate", _("Failed to truncate file"));
}
// Set the start point