Remove failure check for function promised not to fail 14/193914/2
authorIgor Kotrasinski <i.kotrasinsk@partner.samsung.com>
Tue, 27 Nov 2018 10:13:04 +0000 (11:13 +0100)
committerIgor Kotrasinski <i.kotrasinsk@partner.samsung.com>
Tue, 27 Nov 2018 11:18:54 +0000 (12:18 +0100)
Change-Id: Ib4a0d56c59c913f5fb2b707f435d7fef5b0cb422
Signed-off-by: Igor Kotrasinski <i.kotrasinsk@partner.samsung.com>
TEEStub/PropertyAccess/PropertyApi.cpp
TEEStub/PropertyAccess/PropertyUtility.cpp
TEEStub/PropertyAccess/PropertyUtility.h

index dfe8210..a3703fa 100644 (file)
@@ -233,9 +233,8 @@ TEE_Result TEE_GetPropertyAsBinaryBlock(TEE_PropSetHandle propsetOrEnumerator,
            && ((NULL != name && targetProperty->getPropertyByName(queryProp, pv))\r
                || (NULL == name && targetProperty->getPropertyValue(pv)))) {\r
                string binaryBlockOut;\r
-               returnValue = PropertyUtility::convertToBinaryBlock(pv, binaryBlockOut);\r
-               bool conversionStatus = (returnValue == TEE_SUCCESS) ? true : false;\r
-               if (valueBuffer && conversionStatus\r
+               PropertyUtility::convertToBinaryBlock(pv, binaryBlockOut);\r
+               if (valueBuffer\r
                    && binaryBlockOut.size() < *valueBufferLen) {\r
                        strncpy((char*)valueBuffer, binaryBlockOut.c_str(), *valueBufferLen);\r
                }\r
index e16874c..085cdc8 100644 (file)
@@ -160,16 +160,13 @@ TEE_Result PropertyUtility::convertToIdentity(const PropertyValue& in,
  *\r
  * @param in[in]    a property to be converted to a block of Base64 encoded data\r
  * @param out[out]  converted property\r
- * @return TEE_SUCCESS always. Here function returns fixed value for the\r
- * to maintain uniformity.\r
  */\r
-TEE_Result PropertyUtility::convertToBinaryBlock(const PropertyValue& in,\r
+void PropertyUtility::convertToBinaryBlock(const PropertyValue& in,\r
     string& out) {\r
        string s = in.value;\r
        string base64Encoded = PropertyUtility::base64_encode(\r
            reinterpret_cast<const unsigned char*>(s.c_str()), s.size());\r
        out = base64Encoded;\r
-       return TEE_SUCCESS;\r
 }\r
 \r
 /**\r
index 995b3bd..90f975c 100644 (file)
@@ -58,7 +58,7 @@ public:
        static TEE_Result convertToUTF8(const PropertyValue &in, string &out);\r
        static TEE_Result convertToBool(const PropertyValue &in, bool &out);\r
        static TEE_Result convertToU32(const PropertyValue &in, uint32_t &out);\r
-       static TEE_Result convertToBinaryBlock(const PropertyValue &in, string &out);\r
+       static void convertToBinaryBlock(const PropertyValue &in, string &out);\r
        static TEE_Result convertFromBinaryBlock(const string &in, string& out);\r
        static TEE_Result convertToUUID(const PropertyValue &in, TEE_UUID &out);\r
        static TEE_Result convertToIdentity(const PropertyValue &in,\r