diff options
author | Mateusz Cegielka <m.cegielka@samsung.com> | 2020-10-05 17:18:13 +0200 |
---|---|---|
committer | Mateusz Cegielka <m.cegielka@samsung.com> | 2020-10-05 17:23:39 +0200 |
commit | 597dbfac725c4ebbd73e3e38876d122db3332280 (patch) | |
tree | 0b9332d74a4e7a7ba14647a3f0b5ea8a9512b4fb | |
parent | d128a1d5f80597fcf8b410a40f80de43e5ecdd7c (diff) | |
download | key-manager-597dbfac725c4ebbd73e3e38876d122db3332280.tar.gz key-manager-597dbfac725c4ebbd73e3e38876d122db3332280.tar.bz2 key-manager-597dbfac725c4ebbd73e3e38876d122db3332280.zip |
Fix misplaced parentheses in error code comparison
Some newer SVACE version I happened to run locally detected misplaced
parentheses here. Fortunately, this would only result in returning a
wrong error code and not ignoring the error.
I have fixed the mistake, also removing the use of an assignment in an
if statement because there is no reason to do so.
Change-Id: I441e882ffbd484b6a7ec47eeaf5999b5e7992cd7
-rw-r--r-- | src/manager/client-capi/ckmc-manager.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/manager/client-capi/ckmc-manager.cpp b/src/manager/client-capi/ckmc-manager.cpp index 86cc153f..febac67f 100644 --- a/src/manager/client-capi/ckmc-manager.cpp +++ b/src/manager/client-capi/ckmc-manager.cpp @@ -241,12 +241,9 @@ int _toNewCkmcAliasInfoList(const CKM::AliasPwdVector &aliasPwdVector, if (previous != nullptr) previous->next = plist; - if ((ret = _ckmc_alias_info_new(std::get<0>(it).c_str(), std::get<1>(it), - &plist->info) != CKMC_ERROR_NONE)) - { + ret = _ckmc_alias_info_new(std::get<0>(it).c_str(), std::get<1>(it), &plist->info); + if (ret != CKMC_ERROR_NONE) break; - } - } if (ret != CKMC_ERROR_NONE) |