/*
 * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
 *
 * Created in Samsung Ukraine R&D Center (SRK) under a contract between
 * LLC "Samsung Electronics Ukraine Company" (Kiev, Ukraine)
 * and "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
 *
 * Created on: Mar 17, 2016
 * Author: Oleksii Kachkan <o.kachkan@samsung.com>
 * Brief: Macroses defines to check return values from mbedtls and TEE functions
 */

#ifndef __TZWMACROS_H__
#define __TZWMACROS_H__ 

#include "TigerMacros.h"

#define CHECK_TEE_STATUS_SUCCESS_RETURN(msg) \
            TIGER_CHECK_TEE_STATUS_SUCCESS_RETURN(msg)

#define CHECK_TEE_STATUS_SUCCESS_BREAK(msg) \
            TIGER_CHECK_TEE_STATUS_SUCCESS_BREAK(msg)

#define CHECK_TEE_STATUS_SUCCESS_CONTINUE(msg) \
            TIGER_CHECK_TEE_STATUS_SUCCESS_CONTINUE(msg)

#define CHECK_MBEDTLS_RET_ZERO_RETURN(msg) \
            TIGER_CHECK_MBEDTLS_RET_ZERO_RETURN(msg)

#define CHECK_FUNCTION_ARGUMENT_RETURN(condition) \
            TIGER_CHECK_FUNCTION_ARGUMENT_RETURN(condition)

#define CHECK_FUNCTION_ARGUMENT_RETURN_NULL(condition) \
            TIGER_CHECK_FUNCTION_ARGUMENT_RETURN_NULL(condition)

#define CHECK_FUNCTION_ARGUMENT_RETURN_ZERO(condition) \
            TIGER_CHECK_FUNCTION_ARGUMENT_RETURN_ZERO(condition)

#define CHECK_CONDITION_BREAK(condition) \
            TIGER_CHECK_CONDITION_BREAK(condition)

#define CHECK_CONDITION_RETURN(condition) \
            TIGER_CHECK_CONDITION_RETURN(condition)

#define CHECK_BUFFER_ALLOCATED_RETURN(pointer) \
            TIGER_CHECK_BUFFER_ALLOCATED_RETURN(pointer)

#define CHECK_BUFFER_ALLOCATED_BREAK(pointer) \
            TIGER_CHECK_BUFFER_ALLOCATED_BREAK(pointer)

#endif /*__TZWMACROS_H__*/
