summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/analysis/disass/area.c6
-rw-r--r--src/arch/vmpa.c14
-rw-r--r--src/arch/vmpa.h3
3 files changed, 11 insertions, 12 deletions
diff --git a/src/analysis/disass/area.c b/src/analysis/disass/area.c
index c79b293..eddad5c 100644
--- a/src/analysis/disass/area.c
+++ b/src/analysis/disass/area.c
@@ -652,15 +652,15 @@ mem_area_v2 *find_memory_area_by_addr_v2(mem_area_v2 *list, size_t count, const
{
mem_area_v2 *result; /* Elément trouvé à renvoyer */
- int find_mem_area(const vmpa2t *addr, const mem_area_v2 *area)
+ int find_mem_area(const vmpa2t *_addr, const mem_area_v2 *_area)
{
int status; /* Bilan à retourner */
- if (mrange_contains_addr(&area->range, addr))
+ if (mrange_contains_addr(&_area->range, _addr))
status = 0;
else
- status = cmp_vmpa(addr, get_mrange_addr(&area->range));
+ status = cmp_vmpa(_addr, get_mrange_addr(&_area->range));
return status;
diff --git a/src/arch/vmpa.c b/src/arch/vmpa.c
index e2da876..25b01c3 100644
--- a/src/arch/vmpa.c
+++ b/src/arch/vmpa.c
@@ -299,10 +299,10 @@ phys_t compute_vmpa_diff(const vmpa2t *a, const vmpa2t *b)
result = VMPA_NO_PHYSICAL;
if (a->physical != VMPA_NO_PHYSICAL && b->physical != VMPA_NO_PHYSICAL)
- result = (b->physical > a->physical ? b->physical - a->physical : a->physical- b->physical);
+ result = (b->physical > a->physical ? b->physical - a->physical : a->physical - b->physical);
else if (a->virtual != VMPA_NO_VIRTUAL && b->virtual != VMPA_NO_VIRTUAL)
- result = (phys_t)(b->virtual > a->virtual ? b->virtual - a->virtual : a->virtual- b->virtual);
+ result = (phys_t)(b->virtual > a->virtual ? b->virtual - a->virtual : a->virtual - b->virtual);
return result;
@@ -398,23 +398,23 @@ static char *_phys_t_to_string(phys_t phys, MemoryDataSize msize, char buffer[VM
switch (msize)
{
case MDS_8_BITS:
- ret = snprintf(buffer, VMPA_MAX_LEN,"0x%02" PRIx64, (uint64_t)phys);
+ ret = snprintf(buffer, VMPA_MAX_LEN,"0x%02" PRIx64, phys);
break;
case MDS_16_BITS:
- ret = snprintf(buffer, VMPA_MAX_LEN, "0x%04" PRIx64, (uint64_t)phys);
+ ret = snprintf(buffer, VMPA_MAX_LEN, "0x%04" PRIx64, phys);
break;
case MDS_32_BITS:
- ret = snprintf(buffer, VMPA_MAX_LEN, "0x%08" PRIx64, (uint64_t)phys);
+ ret = snprintf(buffer, VMPA_MAX_LEN, "0x%08" PRIx64, phys);
break;
case MDS_64_BITS:
- ret = snprintf(buffer, VMPA_MAX_LEN, "0x%016" PRIx64, (uint64_t)phys);
+ ret = snprintf(buffer, VMPA_MAX_LEN, "0x%016" PRIx64, phys);
break;
default:
- ret = snprintf(buffer, VMPA_MAX_LEN, "0x%" PRIx64, (uint64_t)phys);
+ ret = snprintf(buffer, VMPA_MAX_LEN, "0x%" PRIx64, phys);
break;
}
diff --git a/src/arch/vmpa.h b/src/arch/vmpa.h
index eb63324..cfb9ab5 100644
--- a/src/arch/vmpa.h
+++ b/src/arch/vmpa.h
@@ -29,7 +29,6 @@
#include <malloc.h>
#include <stdbool.h>
#include <stdint.h>
-#include <sys/types.h>
#include "archbase.h"
@@ -49,7 +48,7 @@
/* Types pour respectivement une position physique et une adresse virtuelle */
-#define phys_t off_t
+#define phys_t uint64_t
#define virt_t uint64_t
/* Equivalents pour GLib */