Uhh, lint

This commit is contained in:
Dr. Chat 2015-06-28 12:26:51 -05:00
parent bb900ba9db
commit c47c0b3354
3 changed files with 8 additions and 6 deletions

View File

@ -35,7 +35,8 @@ class XUserModule : public XModule {
uint32_t GetProcAddressByName(const char* name) override; uint32_t GetProcAddressByName(const char* name) override;
X_STATUS GetSection(const char* name, uint32_t* out_section_data, X_STATUS GetSection(const char* name, uint32_t* out_section_data,
uint32_t* out_section_size) override; uint32_t* out_section_size) override;
X_STATUS GetOptHeader(xe_xex2_header_keys key, uint32_t* out_header_guest_ptr); X_STATUS GetOptHeader(xe_xex2_header_keys key,
uint32_t* out_header_guest_ptr);
X_STATUS Launch(uint32_t flags); X_STATUS Launch(uint32_t flags);

View File

@ -29,19 +29,19 @@
namespace xe { namespace xe {
namespace kernel { namespace kernel {
uint8_t* xex2_get_opt_header(const xex2_header* header, uint32_t key) { uint8_t *xex2_get_opt_header(const xex2_header *header, uint32_t key) {
for (uint32_t i = 0; i < header->header_count; i++) { for (uint32_t i = 0; i < header->header_count; i++) {
const xex2_opt_header& opt_header = header->headers[i]; const xex2_opt_header &opt_header = header->headers[i];
if (opt_header.key != key) { if (opt_header.key != key) {
continue; continue;
} }
if ((opt_header.key & 0xFF) == 0x01) { if ((opt_header.key & 0xFF) == 0x01) {
// Data is stored in the opt header // Data is stored in the opt header
return (uint8_t*)&opt_header.value; return (uint8_t *)&opt_header.value;
} else { } else {
// Data stored at offset. // Data stored at offset.
return ((uint8_t*)&header->headers[0] + opt_header.offset); return ((uint8_t *)&header->headers[0] + opt_header.offset);
} }
} }

View File

@ -78,7 +78,8 @@ SHIM_CALL XamGetExecutionId_shim(PPCContext* ppc_context,
assert_not_null(module); assert_not_null(module);
uint32_t guest_hdr_ptr; uint32_t guest_hdr_ptr;
X_STATUS result = module->GetOptHeader(XEX_HEADER_EXECUTION_INFO, &guest_hdr_ptr); X_STATUS result =
module->GetOptHeader(XEX_HEADER_EXECUTION_INFO, &guest_hdr_ptr);
if (XFAILED(result)) { if (XFAILED(result)) {
SHIM_SET_RETURN_32(result); SHIM_SET_RETURN_32(result);