]> sjero.net Git - wget/blobdiff - util/trunc.c
NEWS: cite --start-pos
[wget] / util / trunc.c
index fb52ec2564505cdacc5a24312b3eb91d439f3a2c..a5f1dcb07a5157fcd3fc2a740eaad7dba0e2df60 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2008 Micah J. Cowan
  *
- * Copying and distribution of this file, with or without modification, 
+ * Copying and distribution of this file, with or without modification,
  * are permitted in any medium without royalty provided the copyright
  * notice and this notice are preserved. */
 
@@ -62,7 +62,7 @@ get_size (const char str[])
     {
       val *= 1024 * 1024;
     }
-  
+
   return val;
 }
 
@@ -128,5 +128,11 @@ main (int argc, char *argv[])
       exit (EXIT_FAILURE);
     }
 
+  if (close (fd) < 0)
+    {
+      perror (PROGRAM_NAME ": close");
+      exit (EXIT_FAILURE);
+    }
+
   return 0;
 }