소스 검색

Minor improvement: reset hit_eof in open_compressed_archive

Sergey Poznyakoff 20 년 전
부모
커밋
76bbb5710f
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      src/buffer.c

+ 5 - 5
src/buffer.c

@@ -205,10 +205,7 @@ check_compressed_archive ()
 
   for (p = magic + 1; p < magic + NMAGIC; p++)
     if (memcmp (record_start->buffer, p->magic, p->length) == 0)
-      {
-	hit_eof = false; /* It might have been set by find_next_block */
-	return p->type;
-      }
+      return p->type;
   
   return ct_none;
 }
@@ -233,7 +230,10 @@ open_compressed_archive ()
 
   /* FD is not needed any more */
   rmtclose (archive);
-  
+
+  hit_eof = false; /* It might have been set by find_next_block in
+		      check_compressed_archive */
+
   /* Open compressed archive */
   use_compress_program_option = compress_program (type);
   child_pid = sys_child_open_for_uncompress ();