=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/patch/patch.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/patch/patch.c 1996/09/15 19:19:54 1.5 +++ src/usr.bin/patch/patch.c 1996/09/23 10:54:21 1.6 @@ -1,4 +1,4 @@ -/* $OpenBSD: patch.c,v 1.5 1996/09/15 19:19:54 millert Exp $ */ +/* $OpenBSD: patch.c,v 1.6 1996/09/23 10:54:21 deraadt Exp $ */ /* patch - a program to apply diffs to original files * @@ -9,7 +9,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: patch.c,v 1.5 1996/09/15 19:19:54 millert Exp $"; +static char rcsid[] = "$OpenBSD: patch.c,v 1.6 1996/09/23 10:54:21 deraadt Exp $"; #endif /* not lint */ #include "INTERN.h" @@ -784,10 +784,8 @@ init_output(name) char *name; { - int ofd; - - if ((ofd = open(name, O_CREAT|O_EXCL|O_WRONLY, 0600)) < 0 || - (ofp = fdopen(ofd, "w")) == Nullfp) + ofp = fopen(name, "w"); + if (ofp == Nullfp) pfatal2("can't create %s", name); } @@ -797,10 +795,8 @@ init_reject(name) char *name; { - int rejfd; - - if ((rejfd = open(name, O_CREAT|O_EXCL|O_WRONLY, 0600)) < 0 || - (rejfp = fdopen(rejfd, "w")) == Nullfp) + rejfp = fopen(name, "w"); + if (rejfp == Nullfp) pfatal2("can't create %s", name); }