summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2017-05-19 14:13:24 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2017-05-19 14:13:24 +0200
commitc849ac047db045f6134e7d5edd82a706faf249d0 (patch)
treeb113cafafedd644c66d89016dad0b8850e7884f6 /src
parent097541329828425a374210da147ce818b1d40e36 (diff)
Add .travis.yml in Makefile.am
Small code style modification
Diffstat (limited to 'src')
-rw-r--r--src/chgarchn.c4
-rw-r--r--src/exfat_dir.c11
-rw-r--r--src/file_3dm.c4
-rw-r--r--src/photorec.c10
4 files changed, 22 insertions, 7 deletions
diff --git a/src/chgarchn.c b/src/chgarchn.c
index ccf3ad6..42e1acf 100644
--- a/src/chgarchn.c
+++ b/src/chgarchn.c
@@ -53,7 +53,9 @@ int change_arch_type_ncurses(disk_t *disk, const int verbose)
/* arch_list must match the order from menuOptions */
const arch_fnct_t *arch_list[]={&arch_i386, &arch_gpt, &arch_humax, &arch_mac, &arch_none, &arch_sun, &arch_xbox, NULL};
unsigned int menu;
- for(menu=0;arch_list[menu]!=NULL && disk->arch!=arch_list[menu];menu++);
+ for(menu=0;
+ arch_list[menu]!=NULL && disk->arch!=arch_list[menu];
+ menu++);
if(arch_list[menu]==NULL)
{
menu=0;
diff --git a/src/exfat_dir.c b/src/exfat_dir.c
index 83baf9a..959843e 100644
--- a/src/exfat_dir.c
+++ b/src/exfat_dir.c
@@ -190,10 +190,15 @@ static int dir_exfat_aux(const unsigned char*buffer, const unsigned int size, co
#ifdef HAVE_ICONV
char *outs;
#endif
- unsigned int i,j;
- for(j=0; j<255 && current_file->name[j]!='\0'; j++);
+ unsigned int i;
+ unsigned int j;
+ for(j=0;
+ j<255 && current_file->name[j]!='\0';
+ j++);
#ifdef HAVE_ICONV
- for(i=2; i<32 && (buffer[offset+i]!=0 || buffer[offset+i+1]!=0); i+=2);
+ for(i=2;
+ i<32 && (buffer[offset+i]!=0 || buffer[offset+i+1]!=0);
+ i+=2);
i-=2;
outs=&current_file->name[j];
if(exfat_ucstoutf8(ls->cd, &buffer[offset+2], i, &outs, 512-j) < 0)
diff --git a/src/file_3dm.c b/src/file_3dm.c
index 35c8774..dc1241e 100644
--- a/src/file_3dm.c
+++ b/src/file_3dm.c
@@ -44,7 +44,9 @@ const file_hint_t file_hint_3dm= {
static int header_check_3dm(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)
{
unsigned int i;
- for(i=24; i<buffer_size && buffer[i]==' '; i++);
+ for(i=24;
+ i<buffer_size && buffer[i]==' ';
+ i++);
if(i>=buffer_size || buffer[i]<'0' || buffer[i]>'9')
return 0;
reset_file_recovery(file_recovery_new);
diff --git a/src/photorec.c b/src/photorec.c
index 68c8159..31ffbb2 100644
--- a/src/photorec.c
+++ b/src/photorec.c
@@ -907,14 +907,20 @@ static inline void file_block_remove_from_sp(alloc_data_t *list_search_space, al
alloc_data_t *tmp;
tmp=td_list_entry(search_walker, alloc_data_t, list);
if(tmp->start <= *offset && *offset + blocksize <= tmp->end + 1)
- return file_block_remove_from_sp_aux(tmp, new_current_search_space, offset, blocksize);
+ {
+ file_block_remove_from_sp_aux(tmp, new_current_search_space, offset, blocksize);
+ return;
+ }
}
td_list_for_each(search_walker, &list_search_space->list)
{
alloc_data_t *tmp;
tmp=td_list_entry(search_walker, alloc_data_t, list);
if(tmp->start <= *offset && *offset + blocksize <= tmp->end + 1)
- return file_block_remove_from_sp_aux(tmp, new_current_search_space, offset, blocksize);
+ {
+ file_block_remove_from_sp_aux(tmp, new_current_search_space, offset, blocksize);
+ return ;
+ }
}
log_critical("file_block_remove_from_sp(list_search_space, alloc_data_t **new_current_search_space, uint64_t *offset, const unsigned int blocksize) failed\n");
}