Commit df67486f authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

vhost/rpc: replace strerror with spdk_strerror_r



One instance of strerror() was introduced after the spdk_strerror_r()
function was introduced in commit 4d43844f.  Replace it with the
thread-safe version.

Change-Id: I83c6702f7965044ef5fa3577175f89a13dad833f
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/381601


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent f5e27c45
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -503,6 +503,7 @@ spdk_rpc_get_vhost_controllers(struct spdk_jsonrpc_request *request,
{
	struct rpc_get_vhost_ctrlrs *ctx;
	struct spdk_json_write_ctx *w;
	char buf[64];

	if (params != NULL) {
		spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
@@ -519,7 +520,8 @@ spdk_rpc_get_vhost_controllers(struct spdk_jsonrpc_request *request,

	ctx = calloc(1, sizeof(*ctx));
	if (ctx == NULL) {
		spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR, strerror(-ENOMEM));
		spdk_strerror_r(-ENOMEM, buf, sizeof(buf));
		spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR, buf);
		return;
	}