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:
parent
1316701791
commit
0bfb1aa9be
@ -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'.
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user