From a970e1c139d8838622a37ab9d5df193b158887ba Mon Sep 17 00:00:00 2001 From: XorTroll <33005497+XorTroll@users.noreply.github.com> Date: Fri, 17 Aug 2018 13:12:55 +0200 Subject: [PATCH] Fix spacing according to libnx --- nx/source/services/bpc.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/nx/source/services/bpc.c b/nx/source/services/bpc.c index da89440d..f170142b 100644 --- a/nx/source/services/bpc.c +++ b/nx/source/services/bpc.c @@ -33,8 +33,7 @@ Result bpcShutdownSystem(void) { IpcCommand c; ipcInitialize(&c); - struct - { + struct { u64 magic; u64 cmd_id; } *raw; @@ -43,15 +42,16 @@ Result bpcShutdownSystem(void) raw->cmd_id = 0; Result rc = 0; rc = serviceIpcDispatch(&g_bpcSrv); - if(R_SUCCEEDED(rc)) - { + + if(R_SUCCEEDED(rc)) { IpcParsedCommand r; ipcParse(&r); - struct - { + + struct { u64 magic; u64 result; } *resp = r.Raw; + rc = resp->result; } return rc; @@ -61,25 +61,26 @@ Result bpcRebootSystem(void) { IpcCommand c; ipcInitialize(&c); - struct - { + struct { u64 magic; u64 cmd_id; } *raw; + raw = ipcPrepareHeader(&c, sizeof(*raw)); raw->magic = SFCI_MAGIC; raw->cmd_id = 1; Result rc = 0; + rc = serviceIpcDispatch(&g_bpcSrv); - if(R_SUCCEEDED(rc)) - { + if(R_SUCCEEDED(rc)) { IpcParsedCommand r; ipcParse(&r); - struct - { + + struct { u64 magic; u64 result; } *resp = r.Raw; + rc = resp->result; } return rc;