From 8e80424ccf09d6a9d2b979067eaa6f7d28c03958 Mon Sep 17 00:00:00 2001 From: zhupuxu Date: Thu, 22 Apr 2021 09:46:03 +0800 Subject: [PATCH] clean codex Signed-off-by: zhupuxu --- mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc | 2 +- mindspore/ccsrc/runtime/device/ascend/signal_util.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc b/mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc index 671d020989..64a6ca79c4 100644 --- a/mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc +++ b/mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc @@ -955,7 +955,7 @@ int AscendKernelRuntime::DeleteDumpFile(std::string path) { if (S_ISREG(statbuf.st_mode)) { result = remove(path.c_str()); } else if (S_ISDIR(statbuf.st_mode)) { - if ((dir = opendir(path.c_str())) == NULL) { + if ((dir = opendir(path.c_str())) == nullptr) { return -1; } diff --git a/mindspore/ccsrc/runtime/device/ascend/signal_util.cc b/mindspore/ccsrc/runtime/device/ascend/signal_util.cc index 22a02871de..0a408daf39 100644 --- a/mindspore/ccsrc/runtime/device/ascend/signal_util.cc +++ b/mindspore/ccsrc/runtime/device/ascend/signal_util.cc @@ -28,6 +28,7 @@ SignalGuard::~SignalGuard() { (void)sigemptyset(&int_action.sa_mask); int_action.sa_flags = SA_RESTART | SA_SIGINFO; (void)sigaction(SIGINT, &int_action, nullptr); + old_handler = nullptr; } }