- various "cosmetics" cleanups to shut up gcc complaints on higher warning
[apt.git] / methods / http.cc
index e9a020e..d9b2bc7 100644 (file)
@@ -1,4 +1,4 @@
-// -*- mode: cpp; mode: fold -*-
+// -*- mode: c++; mode: fold -*-
 // Description                                                         /*{{{*/
 // $Id: http.cc,v 1.56 2003/02/12 15:33:36 doogie Exp $
 /* ######################################################################
@@ -87,7 +87,7 @@ void CircleBuf::Reset()
       delete Hash;
       Hash = new Hashes;
    }   
-};
+}
                                                                        /*}}}*/
 // CircleBuf::Read - Read from a FD into the circular buffer           /*{{{*/
 // ---------------------------------------------------------------------
@@ -1018,7 +1018,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)
+         return 5;
    }
       
    // Set the start point
@@ -1106,7 +1107,7 @@ bool HttpMethod::Fetch(FetchItem *)
    }
    
    return true;
-};
+}
                                                                        /*}}}*/
 // HttpMethod::Configuration - Handle a configuration message          /*{{{*/
 // ---------------------------------------------------------------------