diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj
index ef80700b1b..1c53cd4d33 100644
--- a/Core/Core.vcxproj
+++ b/Core/Core.vcxproj
@@ -738,7 +738,6 @@
-
diff --git a/Core/Core.vcxproj.filters b/Core/Core.vcxproj.filters
index 09949201de..c3fb351a71 100644
--- a/Core/Core.vcxproj.filters
+++ b/Core/Core.vcxproj.filters
@@ -1249,6 +1249,5 @@
-
\ No newline at end of file
diff --git a/Core/ELF/ElfReader.cpp b/Core/ELF/ElfReader.cpp
index 745766df92..d9c63b9464 100644
--- a/Core/ELF/ElfReader.cpp
+++ b/Core/ELF/ElfReader.cpp
@@ -41,8 +41,6 @@ const char *ElfReader::GetSectionName(int section) const {
return 0;
}
-
-
void addrToHiLo(u32 addr, u16 &hi, s16 &lo)
{
lo = (addr & 0xFFFF);
@@ -449,9 +447,9 @@ int ElfReader::LoadInto(u32 loadAddress, bool fromTop)
DEBUG_LOG(LOADER,"%i segments:", header->e_phnum);
// First pass : Get the damn bits into RAM
- u32 baseAddress = bRelocate?vaddr:0;
+ u32 baseAddress = bRelocate ? vaddr : 0;
- for (int i=0; ie_phnum; i++)
+ for (int i = 0; i < header->e_phnum; i++)
{
Elf32_Phdr *p = segments + i;
DEBUG_LOG(LOADER, "Type: %08x Vaddr: %08x Filesz: %08x Memsz: %08x ", (int)p->p_type, (u32)p->p_vaddr, (int)p->p_filesz, (int)p->p_memsz);
@@ -587,12 +585,11 @@ int ElfReader::LoadInto(u32 loadAddress, bool fromTop)
SectionID ElfReader::GetSectionByName(const char *name, int firstSection) const
{
- for (int i = firstSection; i < header->e_shnum; i++)
- {
+ if (!name)
+ return -1;
+ for (int i = firstSection; i < header->e_shnum; i++) {
const char *secname = GetSectionName(i);
-
- if (secname != 0 && strcmp(name, secname) == 0)
- {
+ if (secname && strcmp(name, secname) == 0) {
return i;
}
}
diff --git a/Core/ELF/ElfReader.h b/Core/ELF/ElfReader.h
index 80427db58b..407c2afcc5 100644
--- a/Core/ELF/ElfReader.h
+++ b/Core/ELF/ElfReader.h
@@ -85,11 +85,11 @@ public:
}
u8 *GetSectionDataPtr(int section) const {
if (section < 0 || section >= header->e_shnum)
- return 0;
+ return nullptr;
if (sections[section].sh_type != SHT_NOBITS)
return GetPtr(sections[section].sh_offset);
else
- return 0;
+ return nullptr;
}
u8 *GetSegmentPtr(int segment) const {
return GetPtr(segments[segment].p_offset);
diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp
index e81ed772b7..81a13f8f65 100644
--- a/Core/HLE/sceKernelModule.cpp
+++ b/Core/HLE/sceKernelModule.cpp
@@ -1678,6 +1678,7 @@ int sceKernelLoadExec(const char *filename, u32 paramPtr)
return 0;
}
+
static u32 sceKernelLoadModule(const char *name, u32 flags, u32 optionAddr) {
if (!name) {
return hleLogError(LOADER, SCE_KERNEL_ERROR_ILLEGAL_ADDR, "bad filename");