summaryrefslogtreecommitdiffstats
path: root/src/file_sib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_sib.c')
-rw-r--r--src/file_sib.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/file_sib.c b/src/file_sib.c
index 907dc52..6e6d77a 100644
--- a/src/file_sib.c
+++ b/src/file_sib.c
@@ -31,7 +31,6 @@
#include "filegen.h"
static void register_header_check_sib(file_stat_t *file_stat);
-static int header_check_sib(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_sib= {
.extension="sib",
@@ -43,20 +42,15 @@ const file_hint_t file_hint_sib= {
.register_header_check=&register_header_check_sib
};
-static const unsigned char sib_header[9]= {0x0F, 'S', 'I', 'B', 'E', 'L', 'I', 'U', 'S'};
-
-static void register_header_check_sib(file_stat_t *file_stat)
+static int header_check_sib(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, sib_header,sizeof(sib_header), &header_check_sib, file_stat);
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_sib.extension;
+ return 1;
}
-static int header_check_sib(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_sib(file_stat_t *file_stat)
{
- if(memcmp(buffer, sib_header, sizeof(sib_header))==0)
- {
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension=file_hint_sib.extension;
- return 1;
- }
- return 0;
+ static const unsigned char sib_header[9]= {0x0F, 'S', 'I', 'B', 'E', 'L', 'I', 'U', 'S'};
+ register_header_check(0, sib_header,sizeof(sib_header), &header_check_sib, file_stat);
}