mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-05 10:52:15 +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
|
* @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;
|
||||||
|
Loading…
Reference in New Issue
Block a user