fix ocloexec
authorAnas Nashif <anas.nashif@intel.com>
Sun, 4 Nov 2012 15:30:43 +0000 (07:30 -0800)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Fri, 12 Dec 2014 15:56:57 +0000 (16:56 +0100)
lib/analysis.c
lib/floor1.c
lib/psytune.c
lib/res0.c
lib/vorbisfile.c

index 01aa6f3..dc1e818 100644 (file)
@@ -73,7 +73,7 @@ void _analysis_output_always(char *base,int i,float *v,int n,int bark,int dB,ogg
   char buffer[80];
 
   sprintf(buffer,"%s_%d.m",base,i);
-  of=fopen(buffer,"w");
+  of=fopen(buffer,"we");
 
   if(!of)perror("failed to open data dump file");
 
index 097c583..7eeb566 100644 (file)
@@ -902,7 +902,7 @@ int floor1_encode(oggpack_buffer *opb,vorbis_block *vb,
           char buffer[80];
           sprintf(buffer,"line_%dx%ld_class%d.vqd",
                   vb->pcmend/2,posts-2,class);
-          of=fopen(buffer,"a");
+          of=fopen(buffer,"ae");
           fprintf(of,"%d\n",cval);
           fclose(of);
         }
@@ -926,7 +926,7 @@ int floor1_encode(oggpack_buffer *opb,vorbis_block *vb,
             char buffer[80];
             sprintf(buffer,"line_%dx%ld_%dsub%d.vqd",
                     vb->pcmend/2,posts-2,class,bookas[k]);
-            of=fopen(buffer,"a");
+            of=fopen(buffer,"ae");
             fprintf(of,"%d\n",out[j+k]);
             fclose(of);
           }
index 64c1317..c1d2e56 100644 (file)
@@ -202,7 +202,7 @@ void analysis(char *base,int i,float *v,int n,int bark,int dB){
     FILE *of;
     char buffer[80];
     sprintf(buffer,"%s_%d.m",base,i);
-    of=fopen(buffer,"w");
+    of=fopen(buffer,"we");
 
     for(j=0;j<n;j++){
       if(dB && v[j]==0)
index 97cdbba..619d826 100644 (file)
@@ -93,7 +93,7 @@ void res0_free_look(vorbis_look_residue *i){
 
             /* long and short into the same bucket by current convention */
             sprintf(buffer,"res_sub%d_part%d_pass%d.vqd",look->submap,j,k);
-            of=fopen(buffer,"a");
+            of=fopen(buffer,"ae");
 
             for(l=0;l<statebook->entries;l++)
               fprintf(of,"%d:%ld\n",l,look->training_data[k][j][l]);
@@ -467,7 +467,7 @@ static long **_01class(vorbis_block *vb,vorbis_look_residue *vl,
 
     for(i=0;i<ch;i++){
       sprintf(buffer,"resaux_%d.vqd",look->train_seq);
-      of=fopen(buffer,"a");
+      of=fopen(buffer,"ae");
       for(j=0;j<partvals;j++)
         fprintf(of,"%ld, ",partword[i][j]);
       fprintf(of,"\n");
@@ -526,7 +526,7 @@ static long **_2class(vorbis_block *vb,vorbis_look_residue *vl,int **in,
 
 #ifdef TRAIN_RESAUX
   sprintf(buffer,"resaux_%d.vqd",look->train_seq);
-  of=fopen(buffer,"a");
+  of=fopen(buffer,"ae");
   for(i=0;i<partvals;i++)
     fprintf(of,"%ld, ",partword[0][i]);
   fprintf(of,"\n");
index 84bf8c3..9957cb4 100644 (file)
@@ -1010,7 +1010,7 @@ int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes){
 
 int ov_fopen(const char *path,OggVorbis_File *vf){
   int ret;
-  FILE *f = fopen(path,"rb");
+  FILE *f = fopen(path,"rbe");
   if(!f) return -1;
 
   ret = ov_open(f,vf,NULL,0);