X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=util%2Ftrunc.c;h=a5f1dcb07a5157fcd3fc2a740eaad7dba0e2df60;hp=fb52ec2564505cdacc5a24312b3eb91d439f3a2c;hb=320cfdcb658e8d6556ae9dfd902c2db1db866a6b;hpb=e65c797cc6fd5b2b6a18c66a86faea4a38de575c diff --git a/util/trunc.c b/util/trunc.c index fb52ec25..a5f1dcb0 100644 --- a/util/trunc.c +++ b/util/trunc.c @@ -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; }