1
0
mirror of https://github.com/mirror/wget.git synced 2025-04-24 12:10:16 +08:00

trunc: check for `close'-ing the fd errors.

This commit is contained in:
Giuseppe Scrivano 2011-12-11 15:18:11 +01:00
parent 1316701791
commit 0bfb1aa9be
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-12-11 Giuseppe Scrivano <gscrivano@gnu.org>
* util/trunc.c (main): Call `close' on the fd and check for errors.
Reported by: <dga@cs.cmu.edu>.
2011-10-23 Giuseppe Scrivano <gscrivano@gnu.org>
* bootstrap.conf (gnulib_modules): Include module `vsnprintf'.

View File

@ -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;
}