From 2cdb419ddd2a0a67c80d16e55d52b17e29adb884 Mon Sep 17 00:00:00 2001 From: zhouyongfei Date: Sat, 26 Mar 2022 08:45:13 +0000 Subject: [PATCH] fix warning Signed-off-by: zhouyongfei --- services/src/input_method_system_ability.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/src/input_method_system_ability.cpp b/services/src/input_method_system_ability.cpp index 603a588..8b3fb7b 100644 --- a/services/src/input_method_system_ability.cpp +++ b/services/src/input_method_system_ability.cpp @@ -339,7 +339,7 @@ namespace MiscServices { } PerUserSession *userSession = GetUserSession(userId); - if (user!session) { + if (!userSession) { return ErrorCode::ERROR_NULL_POINTER; } KeyboardType *type = userSession->GetCurrentKeyboardType(); @@ -540,7 +540,7 @@ namespace MiscServices { Message *destMsg = new Message(MSG_ID_EXIT_SERVICE, nullptr); handler->SendMessage(destMsg); PerUserSession *userSession = GetUserSession(it->first); - if (user!session) { + if (!userSession) { IMSA_HILOGE("getUserSession fail."); return; }