[BACK]Return to patch.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / patch

Diff for /src/usr.bin/patch/patch.c between version 1.4 and 1.5

version 1.4, 1996/07/01 20:40:09 version 1.5, 1996/09/15 19:19:54
Line 784 
Line 784 
 init_output(name)  init_output(name)
 char *name;  char *name;
 {  {
     ofp = fopen(name, "w");      int ofd;
     if (ofp == Nullfp)  
       if ((ofd = open(name, O_CREAT|O_EXCL|O_WRONLY, 0600)) < 0 ||
           (ofp = fdopen(ofd, "w")) == Nullfp)
         pfatal2("can't create %s", name);          pfatal2("can't create %s", name);
 }  }
   
Line 795 
Line 797 
 init_reject(name)  init_reject(name)
 char *name;  char *name;
 {  {
     rejfp = fopen(name, "w");      int rejfd;
     if (rejfp == Nullfp)  
       if ((rejfd = open(name, O_CREAT|O_EXCL|O_WRONLY, 0600)) < 0 ||
           (rejfp = fdopen(rejfd, "w")) == Nullfp)
         pfatal2("can't create %s", name);          pfatal2("can't create %s", name);
 }  }
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5