Reorganize arguments to BOOST_REQUIRE_MESSAGE 18/212818/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.023522 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090953 accepted/tizen/5.5/unified/wearable/hotfix/20201027.113545 accepted/tizen/unified/20190904.110643 submit/tizen/20190829.054731 submit/tizen/20190904.052237 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 submit/tizen_5.5_wearable_hotfix/20201026.184304 tizen_5.5.m2_release
authorTomasz Swierczek <t.swierczek@samsung.com>
Tue, 27 Aug 2019 05:08:15 +0000 (07:08 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Tue, 27 Aug 2019 05:08:15 +0000 (07:08 +0200)
Static analysis tools were complaining about assignment.

Change-Id: Iea9530b718d4aa823e01293fb6a81c95a9055f5c

test/cs_test.cc

index a0695fc..a6dc199 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *  Copyright (c) 2016-2019 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *  Contact: Kyungwook Tak <k.tak@samsung.com>
  *
@@ -68,8 +68,8 @@ static void derive_key_with_pass(const char *pass, int passlen)
 
     constexpr unsigned int KeyLen = 20;
     unsigned char *key = nullptr;
-    BOOST_REQUIRE_MESSAGE(
-        (retval = cs_derive_key_with_pass(pass, passlen, KeyLen, &key)) == CS_ERROR_NONE,
+    retval = cs_derive_key_with_pass(pass, passlen, KeyLen, &key);
+    BOOST_REQUIRE_MESSAGE(retval == CS_ERROR_NONE,
         "Failed to cs_derive_key_with_pass with retval: " << retval);
 
     std::unique_ptr<unsigned char, void(*)(void *)> pKey(key, free);