Ensure proper return for booleans, and small issues

This commit is contained in:
shibbo 2019-01-25 02:35:33 -05:00
parent 8ed8e36a39
commit 8fccf55c17

View File

@ -1,8 +1,8 @@
/** /**
* @file nifm.h * @file nifm.h
* @brief Network interface service IPC wrapper. * @brief Network interface service IPC wrapper.
* @author shadowninja108
* @author shibboleet * @author shibboleet
* @author shadowninja108
* @copyright libnx Authors * @copyright libnx Authors
*/ */
@ -146,7 +146,9 @@ Result nifmIsEthernetCommunicationEnabled(bool* out) {
resp = r.Raw; resp = r.Raw;
rc = resp->result; rc = resp->result;
*out = resp->out;
if (R_SUCCEEDED(rc) && out)
*out = resp->out != 0;
} }
return rc; return rc;
@ -181,7 +183,9 @@ Result nifmIsAnyForegroundRequestAccepted(bool* out) {
resp = r.Raw; resp = r.Raw;
rc = resp->result; rc = resp->result;
*out = resp->out;
if (R_SUCCEEDED(rc) && out)
*out = resp->out != 0;
} }
return rc; return rc;