summaryrefslogtreecommitdiffstats
path: root/src/file_rfp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_rfp.c')
-rw-r--r--src/file_rfp.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/file_rfp.c b/src/file_rfp.c
index c56d5b3..879988b 100644
--- a/src/file_rfp.c
+++ b/src/file_rfp.c
@@ -31,7 +31,6 @@
#include "filegen.h"
static void register_header_check_rfp(file_stat_t *file_stat);
-static int header_check_rfp(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
const file_hint_t file_hint_rfp= {
.extension="rfp",
@@ -43,23 +42,18 @@ const file_hint_t file_hint_rfp= {
.register_header_check=&register_header_check_rfp
};
-static const unsigned char rfp_header[10]= {
- 'U' , 'R' , 'L' , '3' , ':', 'v' , 'e' , 'r' ,
- '3' , ':',
-};
-
-static void register_header_check_rfp(file_stat_t *file_stat)
+static int header_check_rfp(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
{
- register_header_check(0, rfp_header, sizeof(rfp_header), &header_check_rfp, file_stat);
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_rfp.extension;
+ return 1;
}
-static int header_check_rfp(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+static void register_header_check_rfp(file_stat_t *file_stat)
{
- if(memcmp(buffer, rfp_header, sizeof(rfp_header))==0)
- {
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension=file_hint_rfp.extension;
- return 1;
- }
- return 0;
+ static const unsigned char rfp_header[10]= {
+ 'U' , 'R' , 'L' , '3' , ':', 'v' , 'e' , 'r' ,
+ '3' , ':',
+ };
+ register_header_check(0, rfp_header, sizeof(rfp_header), &header_check_rfp, file_stat);
}