event/rpc: Use spdk_strtol to clarify if signal is specified by name
Change-Id: I550802d70f415d24284a1afc43bdc83d43582355 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/441640 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
b2a7f2bd4f
commit
26e6b505a5
@ -35,6 +35,7 @@
|
||||
|
||||
#include "spdk/event.h"
|
||||
#include "spdk/rpc.h"
|
||||
#include "spdk/string.h"
|
||||
#include "spdk/util.h"
|
||||
|
||||
#include "spdk_internal/log.h"
|
||||
@ -80,7 +81,7 @@ spdk_rpc_kill_instance(struct spdk_jsonrpc_request *request,
|
||||
}
|
||||
|
||||
sig_count = SPDK_COUNTOF(signals);
|
||||
signal = atoi(req.sig_name);
|
||||
signal = spdk_strtol(req.sig_name, 10);
|
||||
for (i = 0 ; i < sig_count; i++) {
|
||||
if (strcmp(req.sig_name, signals[i].signal_string) == 0 ||
|
||||
signal == signals[i].signal) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user