summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-01-05 21:21:59 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-01-05 21:21:59 (GMT)
commitabec2acca0c300ab43e3fec73602e216c078b391 (patch)
treef2dc21158d5665cb409df475743226d59ae65a72 /src/arch
parent639a993fd7400f95eb09ec69d89f227ef41b2865 (diff)
Ensured the right macro is used (XSTR vs STR).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@448 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/vmpa.c10
-rw-r--r--src/arch/vmpa.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/arch/vmpa.c b/src/arch/vmpa.c
index 7d57909..fcc1e2f 100644
--- a/src/arch/vmpa.c
+++ b/src/arch/vmpa.c
@@ -356,23 +356,23 @@ char *vmpa2_phys_to_string(const vmpa2t *addr, MemoryDataSize msize, char buffer
switch (msize)
{
case MDS_8_BITS:
- ret = snprintf(buffer, VMPA_MAX_LEN,"0x%02" PRIx64, addr->physical);
+ ret = snprintf(buffer, VMPA_MAX_LEN,"0x%02" PRIx64, (uint64_t)addr->physical);
break;
case MDS_16_BITS:
- ret = snprintf(buffer, VMPA_MAX_LEN, "0x%04" PRIx64, addr->physical);
+ ret = snprintf(buffer, VMPA_MAX_LEN, "0x%04" PRIx64, (uint64_t)addr->physical);
break;
case MDS_32_BITS:
- ret = snprintf(buffer, VMPA_MAX_LEN, "0x%08" PRIx64, addr->physical);
+ ret = snprintf(buffer, VMPA_MAX_LEN, "0x%08" PRIx64, (uint64_t)addr->physical);
break;
case MDS_64_BITS:
- ret = snprintf(buffer, VMPA_MAX_LEN, "0x%016" PRIx64, addr->physical);
+ ret = snprintf(buffer, VMPA_MAX_LEN, "0x%016" PRIx64, (uint64_t)addr->physical);
break;
default:
- ret = snprintf(buffer, VMPA_MAX_LEN, "0x%" PRIx64, addr->physical);
+ ret = snprintf(buffer, VMPA_MAX_LEN, "0x%" PRIx64, (uint64_t)addr->physical);
break;
}
diff --git a/src/arch/vmpa.h b/src/arch/vmpa.h
index 96e8a56..54dbda9 100644
--- a/src/arch/vmpa.h
+++ b/src/arch/vmpa.h
@@ -42,7 +42,7 @@
/* Taille de la plus longue chaîne de représentation */
-#define VMPA_MAX_LEN (sizeof(STR(ULLONG_MAX)) + 1)
+#define VMPA_MAX_LEN (2 + sizeof(XSTR(UINT64_MAX)) + 1)
/* Constitution guidée de tampons pour impression */
#define VMPA_BUFFER(name) char name[VMPA_MAX_LEN]