summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2020-08-08 12:35:17 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2020-08-08 12:35:17 +0200
commit974d01c5c157138e1b7138da7876a220016bf033 (patch)
treed590e6374a51ea5ec39a112baf182dec9cb33d90
parent8587bc1ddbcd3b0810e99c08e14b05d165668b11 (diff)
autodetect_arch(): avoid some function pointers
-rw-r--r--src/partauto.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/partauto.c b/src/partauto.c
index 70bd972..d2b5adc 100644
--- a/src/partauto.c
+++ b/src/partauto.c
@@ -54,7 +54,7 @@ void autodetect_arch(disk_t *disk, const arch_fnct_t *arch)
#endif
{
disk->arch=&arch_none;
- list_part=disk->arch->read_part(disk,verbose,0);
+ list_part=arch_none.read_part(disk,verbose,0);
if(list_part!=NULL && list_part->part!=NULL && list_part->part->upart_type==UP_UNK)
{
part_free_list(list_part);
@@ -64,32 +64,32 @@ void autodetect_arch(disk_t *disk, const arch_fnct_t *arch)
if(list_part==NULL)
{
disk->arch=&arch_xbox;
- list_part=disk->arch->read_part(disk,verbose,0);
+ list_part=arch_xbox.read_part(disk,verbose,0);
}
if(list_part==NULL)
{
disk->arch=&arch_gpt;
- list_part=disk->arch->read_part(disk,verbose,0);
+ list_part=arch_gpt.read_part(disk,verbose,0);
}
if(list_part==NULL)
{
disk->arch=&arch_humax;
- list_part=disk->arch->read_part(disk,verbose,0);
+ list_part=arch_humax.read_part(disk,verbose,0);
}
if(list_part==NULL)
{
disk->arch=&arch_i386;
- list_part=disk->arch->read_part(disk,verbose,0);
+ list_part=arch_i386.read_part(disk,verbose,0);
}
if(list_part==NULL)
{
disk->arch=&arch_sun;
- list_part=disk->arch->read_part(disk,verbose,0);
+ list_part=arch_sun.read_part(disk,verbose,0);
}
if(list_part==NULL)
{
disk->arch=&arch_mac;
- list_part=disk->arch->read_part(disk,verbose,0);
+ list_part=arch_mac.read_part(disk,verbose,0);
}
#ifndef DEBUG_PARTAUTO
log_set_levels(old_levels);