diff --git a/lib/event/json_config.c b/lib/event/json_config.c index ba8d2bc196..02dccd789d 100644 --- a/lib/event/json_config.c +++ b/lib/event/json_config.c @@ -189,7 +189,7 @@ rpc_client_poller(void *arg) assert(resp); if (resp->error) { - SPDK_ERRLOG("error response: %*s", (int)resp->error->len, (char *)resp->error->start); + SPDK_ERRLOG("error response: %.*s", (int)resp->error->len, (char *)resp->error->start); } if (resp->error && ctx->stop_on_error) { @@ -339,7 +339,7 @@ spdk_app_json_config_load_subsystem_config_entry(void *_ctx) params_end = spdk_json_next(ctx->config_it); assert(params_end != NULL); params_len = params_end->start - ctx->config->start + 1; - SPDK_ERRLOG("Failed to decode config entry: %*s!\n", (int)params_len, (char *)ctx->config_it); + SPDK_ERRLOG("Failed to decode config entry: %.*s!\n", (int)params_len, (char *)ctx->config_it); spdk_app_json_config_load_done(ctx, -EINVAL); goto out; } diff --git a/test/rpc_client/rpc_client_test.c b/test/rpc_client/rpc_client_test.c index 65540d514c..4b421f7bbe 100644 --- a/test/rpc_client/rpc_client_test.c +++ b/test/rpc_client/rpc_client_test.c @@ -308,7 +308,7 @@ spdk_jsonrpc_client_hook_conn_close(struct spdk_jsonrpc_client *client) /* Check for error response */ if (json_resp->error != NULL) { - SPDK_ERRLOG("Unexpected error response: %*s\n", json_resp->error->len, + SPDK_ERRLOG("Unexpected error response: %.*s\n", json_resp->error->len, (char *)json_resp->error->start); rc = -EIO; goto out;