From 9f99b74a3c648b938f69b15edf3850e9daba2190 Mon Sep 17 00:00:00 2001 From: Parkhi Date: Fri, 9 Dec 2016 15:44:07 +0900 Subject: [PATCH] Fix defects detected by static analysis Change-Id: Iee6f843db1602d0a6fcc0bd43841d306d4a7257c Signed-off-by: Parkhi Reviewed-on: https://gerrit.iotivity.org/gerrit/15331 Tested-by: jenkins-iotivity Reviewed-by: JungYong KIM Reviewed-by: Senthil Kumar G S Reviewed-by: Jihun Ha Reviewed-by: Uze Choi (cherry picked from commit f36c71f082f9e5eca0249a30d3f8104f726d27b1) Reviewed-on: https://gerrit.iotivity.org/gerrit/15557 --- service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp b/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp index fac771a..e20c521 100755 --- a/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp +++ b/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp @@ -135,7 +135,8 @@ namespace OIC if (std::string::npos == dot) // MAC { size_t semi_count = std::count(host_token.begin(), host_token.end(), ':'); - if (semi_count > 5) { + if (semi_count > 5) + { size_t found_semi = host_token.find_last_of(':'); host_token = host_token.substr(0, found_semi); } -- 2.7.4