Skip to content

Commit

Permalink
Return "" instead of NULL for empty errors in nfs_get_error()
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
  • Loading branch information
sahlberg committed Dec 16, 2019
1 parent 33a5d08 commit 548fa96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ char *rpc_get_error(struct rpc_context *rpc)
{
assert(rpc->magic == RPC_CONTEXT_MAGIC);

return rpc->error_string;
return rpc->error_string ? rpc->error_string : "";
}

static void rpc_purge_all_pdus(struct rpc_context *rpc, int status, const char *error)
Expand Down

0 comments on commit 548fa96

Please sign in to comment.