mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
nix_err_code: do not fail
This commit is contained in:
parent
b0741f7128
commit
f41a7e326b
2 changed files with 4 additions and 7 deletions
|
@ -127,10 +127,7 @@ nix_err nix_err_info_msg(nix_c_context *context,
|
|||
n);
|
||||
}
|
||||
|
||||
nix_err nix_err_code(nix_c_context *context,
|
||||
const nix_c_context *read_context) {
|
||||
if (context)
|
||||
context->last_err_code = NIX_OK;
|
||||
nix_err nix_err_code(const nix_c_context *read_context) {
|
||||
return read_context->last_err_code;
|
||||
}
|
||||
|
||||
|
|
|
@ -253,12 +253,12 @@ nix_err nix_err_name(nix_c_context *context, const nix_c_context *read_context,
|
|||
*
|
||||
* Equivalent to reading the first field of the context.
|
||||
*
|
||||
* @param[out] context optional, the context to store errors in if this function
|
||||
* fails
|
||||
* Does not fail
|
||||
*
|
||||
* @param[in] read_context the context to retrieve the error message from
|
||||
* @return most recent error code stored in the context.
|
||||
*/
|
||||
nix_err nix_err_code(nix_c_context *context, const nix_c_context *read_context);
|
||||
nix_err nix_err_code(const nix_c_context *read_context);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
Loading…
Reference in a new issue