summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2008-10-28 18:14:29 +0100
committerMichael Vogt <mvo@debian.org>2008-10-28 18:14:29 +0100
commit3c8cda8b05d6eeaef76c7ccc673fe378b0c74f37 (patch)
tree3b77f2863a7fb6042d159eef95f17cff4016cbdf /methods/http.cc
parentd210bd7f6a72a2b24a1402f51b39c61438482827 (diff)
fix various -Wall warnings
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/methods/http.cc b/methods/http.cc
index 26d435dea..b3c791fa0 100644
--- 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