summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/vmpa.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/arch/vmpa.c b/src/arch/vmpa.c
index a2a3ba5..70ea52b 100644
--- a/src/arch/vmpa.c
+++ b/src/arch/vmpa.c
@@ -813,36 +813,24 @@ bool store_vmpa(const vmpa2t *addr, const char *base, bound_value **values, size
asprintf(&value->name, "%s%sphys", base != NULL ? base : "", base != NULL ? "_" : "");
value->built_name = true;
+ value->type = SQLITE_INT64;
+
value->has_value = (addr != NULL);
if (value->has_value)
- {
- if (addr->physical != VMPA_NO_PHYSICAL)
- {
- value->type = SQLITE_INT64;
- value->integer64 = addr->physical;
- }
- else
- value->type = SQLITE_NULL;
- }
+ value->integer64 = addr->physical;
value = &(*values)[*count - 1];
asprintf(&value->name, "%s%svirt", base != NULL ? base : "", base != NULL ? "_" : "");
value->built_name = true;
+ value->type = SQLITE_INT64;
+
value->has_value = (addr != NULL);
if (value->has_value)
- {
- if (addr->virtual != VMPA_NO_VIRTUAL)
- {
- value->type = SQLITE_INT64;
- value->integer64 = addr->virtual;
- }
- else
- value->type = SQLITE_NULL;
- }
+ value->integer64 = addr->virtual;
return true;