=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/patch/patch.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/patch/patch.c 1996/06/25 23:06:39 1.3 --- src/usr.bin/patch/patch.c 1996/07/01 20:40:09 1.4 *************** *** 1,4 **** ! /* $OpenBSD: patch.c,v 1.3 1996/06/25 23:06:39 deraadt Exp $ */ /* patch - a program to apply diffs to original files * --- 1,4 ---- ! /* $OpenBSD: patch.c,v 1.4 1996/07/01 20:40:09 deraadt Exp $ */ /* patch - a program to apply diffs to original files * *************** *** 9,15 **** */ #ifndef lint ! static char rcsid[] = "$OpenBSD: patch.c,v 1.3 1996/06/25 23:06:39 deraadt Exp $"; #endif /* not lint */ #include "INTERN.h" --- 9,15 ---- */ #ifndef lint ! static char rcsid[] = "$OpenBSD: patch.c,v 1.4 1996/07/01 20:40:09 deraadt Exp $"; #endif /* not lint */ #include "INTERN.h" *************** *** 784,797 **** init_output(name) char *name; { ! int fd; ! ! if ((fd = open(name, O_EXCL|O_CREAT|O_RDWR, 0666)) == -1 || ! (ofp = fdopen(fd, "w")) == NULL) { ! if (fd != -1) ! close(fd); pfatal2("can't create %s", name); - } } /* Open a file to put hunks we can't locate. */ --- 784,792 ---- init_output(name) char *name; { ! ofp = fopen(name, "w"); ! if (ofp == Nullfp) pfatal2("can't create %s", name); } /* Open a file to put hunks we can't locate. */ *************** *** 800,813 **** init_reject(name) char *name; { ! int fd; ! ! if ((fd = open(name, O_EXCL|O_CREAT|O_RDWR, 0666)) == -1 || ! (rejfp = fdopen(fd, "w")) == NULL) { ! if (fd != -1) ! close(fd); pfatal2("can't create %s", name); - } } /* Copy input file to output, up to wherever hunk is to be applied. */ --- 795,803 ---- init_reject(name) char *name; { ! rejfp = fopen(name, "w"); ! if (rejfp == Nullfp) pfatal2("can't create %s", name); } /* Copy input file to output, up to wherever hunk is to be applied. */