summaryrefslogtreecommitdiffstats
path: root/src/file_mp3.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-11-13 09:13:28 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2008-11-13 09:13:28 +0100
commit86ca5ef632d701431369b4625a93e2ee48278cdd (patch)
tree65612e2b96ba62d623ed7835539f76c54491fe83 /src/file_mp3.c
parenta9950f068cc591506410cf07157537337336d896 (diff)
PhotoRec: declare as const some variables in file_mp3.c
Diffstat (limited to 'src/file_mp3.c')
-rw-r--r--src/file_mp3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file_mp3.c b/src/file_mp3.c
index 84fc7a5..469224c 100644
--- a/src/file_mp3.c
+++ b/src/file_mp3.c
@@ -259,7 +259,7 @@ static int data_check_mp3(const unsigned char *buffer, const unsigned int buffer
file_recovery->calculated_file_size + 16 < file_recovery->file_size + buffer_size/2)
{
unsigned int MMT_size = 0;
- unsigned int i=file_recovery->calculated_file_size - file_recovery->file_size + buffer_size/2;
+ const unsigned int i=file_recovery->calculated_file_size - file_recovery->file_size + buffer_size/2;
/*
log_trace("data_check_mp3 start i=0x%x buffer_size=0x%x calculated_file_size=%lu file_size=%lu\n",
i, buffer_size,
@@ -336,7 +336,7 @@ static int data_check_mp3(const unsigned char *buffer, const unsigned int buffer
}
else if(buffer[i]=='A' && buffer[i+1]=='P' && buffer[i+2]=='E' && buffer[i+3]=='T' && buffer[i+4]=='A' && buffer[i+5]=='G' && buffer[i+6]=='E' && buffer[i+7]=='X')
{ /* APE Tagv2 (APE Tagv1 has no header) http://wiki.hydrogenaudio.org/index.php?title=APE_Tags_Header */
- unsigned int ape_tag_size = (buffer[i+12] + (buffer[i+13]<<8) + (buffer[i+14]<<16) + (buffer[i+15]<<24))+32;
+ const unsigned int ape_tag_size = (buffer[i+12] + (buffer[i+13]<<8) + (buffer[i+14]<<16) + (buffer[i+15]<<24))+32;
file_recovery->calculated_file_size+=ape_tag_size;
}
else if(buffer[i]=='T' && buffer[i+1]=='A' && buffer[i+2]=='G')