aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/programloader.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-12-21 14:59:09 +0100
committerKarel Kočí <cynerd@email.cz>2017-12-21 14:59:09 +0100
commitf1c0203237b976c366bedd950a2e6ffbcb8f7bcd (patch)
tree263a80f63f3b5056e5997edaf8ac694a73927e5c /qtmips_machine/programloader.cpp
parent5715b6b916a5049b2f5542c022a41f895b9572a4 (diff)
downloadqtmips-f1c0203237b976c366bedd950a2e6ffbcb8f7bcd.tar.gz
qtmips-f1c0203237b976c366bedd950a2e6ffbcb8f7bcd.tar.bz2
qtmips-f1c0203237b976c366bedd950a2e6ffbcb8f7bcd.zip
Some pleanups and small fixes
These are just code fixes. Shouldn't change anything but makes code cleaner.
Diffstat (limited to 'qtmips_machine/programloader.cpp')
-rw-r--r--qtmips_machine/programloader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qtmips_machine/programloader.cpp b/qtmips_machine/programloader.cpp
index 4a10540..fd0679d 100644
--- a/qtmips_machine/programloader.cpp
+++ b/qtmips_machine/programloader.cpp
@@ -2,7 +2,7 @@
#include <exception>
#include <unistd.h>
#include <fcntl.h>
-#include <errno.h>
+#include <cerrno>
#include <cstring>
#include "qtmipsexception.h"
@@ -47,7 +47,7 @@ ProgramLoader::ProgramLoader(const char *file) {
// We want only LOAD sections so we create map of those sections
for (unsigned i = 1; i < this->n_secs; i++) {
// TODO handle endianity
- if (this->phdrs[i].p_type != PT_LOAD)
+ if (phdrs[i].p_type != PT_LOAD)
continue;
this->map.push_back(i);
}