Re: svn commit: r250972 - head/usr.bin/patch

2013-05-27 Thread Bruce Evans
n Sun, 26 May 2013, Stefan Esser wrote: Am 25.05.2013 06:31, schrieb Bruce Evans: On Fri, 24 May 2013, Stefan Esser wrote: ... Another possibility (too obfuscated for my taste) is: if (ferror(ofp) { fclose(ofp); ofp = NULL; } if (ofp ==

Re: svn commit: r250972 - head/usr.bin/patch

2013-05-26 Thread Pawel Jakub Dawidek
On Sat, May 25, 2013 at 01:11:27AM -0400, Glen Barber wrote: > On Fri, May 24, 2013 at 06:54:52PM +, Stefan Esser wrote: > > Author: se > > Date: Fri May 24 18:54:52 2013 > > New Revision: 250972 > > URL: http://svnweb.freebsd.org/changeset/base/250972 > > > > > [...] > > > @@ -977,7 +977,7

Re: svn commit: r250972 - head/usr.bin/patch

2013-05-26 Thread Stefan Esser
Am 25.05.2013 06:31, schrieb Bruce Evans: > On Fri, 24 May 2013, Stefan Esser wrote: > >> ... >> Log: >> The error handling for writes to the target file could lead to the final >> fclose() being skipped. Fix this by using boolean "&" and "|" instead of >> short-cut operators "&&" and "||". >>

Re: svn commit: r250972 - head/usr.bin/patch

2013-05-24 Thread Glen Barber
On Fri, May 24, 2013 at 06:54:52PM +, Stefan Esser wrote: > Author: se > Date: Fri May 24 18:54:52 2013 > New Revision: 250972 > URL: http://svnweb.freebsd.org/changeset/base/250972 > > [...] > @@ -977,7 +977,7 @@ spew_output(void) > #endif > if (input_lines) > copy_till

Re: svn commit: r250972 - head/usr.bin/patch

2013-05-24 Thread Bruce Evans
On Fri, 24 May 2013, Stefan Esser wrote: ... Log: The error handling for writes to the target file could lead to the final fclose() being skipped. Fix this by using boolean "&" and "|" instead of short-cut operators "&&" and "||". While here, increment the last part of the version string. Th

svn commit: r250972 - head/usr.bin/patch

2013-05-24 Thread Stefan Esser
Author: se Date: Fri May 24 18:54:52 2013 New Revision: 250972 URL: http://svnweb.freebsd.org/changeset/base/250972 Log: The error handling for writes to the target file could lead to the final fclose() being skipped. Fix this by using boolean "&" and "|" instead of short-cut operators "&&"