Browse code

Some warnings fixed in yc.

git-svn: trunk@1826

aCaB authored on 2006/01/23 20:13:48
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon Jan 23 12:12:07 CET 2006 (acab)
2
+-----------------------------------
3
+  * libclamav/yc.c	Fix warnings
4
+
1 5
 Sun Jan 22 20:23:56 GMT 2006 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/mbox.c	NEW_WORLD: speed up when not looking for Phish
... ...
@@ -79,9 +79,9 @@ static int yc_poly_emulator(char* decryptor_offset, char* code, unsigned int ecx
79 79
   */
80 80
   unsigned char al;
81 81
   unsigned char cl = ecx & 0xff;
82
-  unsigned int j=0,i=0;
82
+  unsigned int j,i;
83 83
 
84
-  for(i;i<ecx;i++) /* Byte looper - Decrypts every byte and write it back */
84
+  for(i=0;i<ecx;i++) /* Byte looper - Decrypts every byte and write it back */
85 85
     {
86 86
       al = code[i];
87 87
 
... ...
@@ -182,7 +182,7 @@ static int yc_poly_emulator(char* decryptor_offset, char* code, unsigned int ecx
182 182
 int yc_decrypt(char *fbuf, unsigned int filesize, struct pe_image_section_hdr *sections, unsigned int sectcount, uint32_t peoffset, int desc)
183 183
 {
184 184
   uint32_t ycsect = EC32(sections[sectcount].PointerToRawData);
185
-  int i = 0;
185
+  int i;
186 186
   struct pe_image_file_hdr *pe = (struct pe_image_file_hdr*) (fbuf + peoffset);
187 187
 
188 188
   /* 
... ...
@@ -211,7 +211,7 @@ int yc_decrypt(char *fbuf, unsigned int filesize, struct pe_image_section_hdr *s
211 211
 
212 212
 
213 213
   /* Loop through all sections and decrypt them... */
214
-  for(i;i<sectcount;i++)
214
+  for(i=0;i<sectcount;i++)
215 215
     {
216 216
       uint32_t name = (uint32_t) cli_readint32((char *)sections[i].Name);
217 217
       if ( name == 0x63727372 || /* rsrc */