mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-05 02:52:13 +02:00
Ensure proper return for booleans, and small issues
This commit is contained in:
parent
8ed8e36a39
commit
8fccf55c17
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @file nifm.h
|
||||
* @brief Network interface service IPC wrapper.
|
||||
* @author shadowninja108
|
||||
* @author shibboleet
|
||||
* @author shadowninja108
|
||||
* @copyright libnx Authors
|
||||
*/
|
||||
|
||||
@ -146,7 +146,9 @@ Result nifmIsEthernetCommunicationEnabled(bool* out) {
|
||||
resp = r.Raw;
|
||||
|
||||
rc = resp->result;
|
||||
*out = resp->out;
|
||||
|
||||
if (R_SUCCEEDED(rc) && out)
|
||||
*out = resp->out != 0;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@ -181,7 +183,9 @@ Result nifmIsAnyForegroundRequestAccepted(bool* out) {
|
||||
resp = r.Raw;
|
||||
|
||||
rc = resp->result;
|
||||
*out = resp->out;
|
||||
|
||||
if (R_SUCCEEDED(rc) && out)
|
||||
*out = resp->out != 0;
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user