!341 对代码进行优化

Merge pull request !341 from wuqi/master
This commit is contained in:
openharmony_ci
2022-03-14 04:06:53 +00:00
committed by Gitee
+2 -2
View File
@@ -16,7 +16,7 @@
#include "pin_auth.h"
#include <memory>
#include <cstring>
#include <string>
#include "dm_constants.h"
#include "dm_log.h"
@@ -66,7 +66,7 @@ int32_t PinAuth::StartAuth(std::string &authToken, std::shared_ptr<DmAuthManager
int32_t PinAuth::VerifyAuthentication(std::string &authToken, const std::string &authParam)
{
times_ += 1;
if (strlen(authParam.c_str()) == 1) {
if (authParam.length() == 1) {
if (authParam == "0") {
return DM_OK;
}