Commit 27cad85a authored by Oleksandr Dmytrenko's avatar Oleksandr Dmytrenko

windows syntax error C2059 fix

windows syntax error C2059 fix

Change-Id: I3aeb5ea1a90d3c9ba4e35e48c3be9e6d7061af79
Signed-off-by: default avatarOleksandr Dmytrenko <o.dmytrenko@samsung.com>
parent b1303d77
......@@ -519,6 +519,12 @@ struct OicSecRole
char authority[ROLEAUTHORITY_LENGTH]; // 1:R:S:N:String
};
#if (__STDC_VERSION__ >= 199901L)
#define ZERO_ROLE {.id = { 0 }, .authority = { 0 }};
#else
#define ZERO_ROLE {{ 0 }, { 0 }};
#endif
typedef enum OicSecConntype
{
AUTH_CRYPT, // any subject requesting over authenticated and encrypted channel
......
......@@ -265,7 +265,7 @@ static void ClearRequestContext(SRMRequestContext_t *context)
// denied).
bool IsRequestOverSecureChannel(SRMRequestContext_t *context)
{
OicUuid_t nullSubjectId = {.id = {0}};
OicUuid_t nullSubjectId = OC_ZERO_UUID;
// If flag set, return true
if (context->endPoint->flags & CA_SECURE)
......@@ -637,7 +637,7 @@ OicSecSvrType_t GetSvrTypeFromUri(const char* uri)
/**
* An unset role, used in comparisons.
*/
const OicSecRole_t EMPTY_ROLE = { .id = { 0 }, .authority = { 0 } };
const OicSecRole_t EMPTY_ROLE = ZERO_ROLE;
bool IsNonEmptyRole(const OicSecRole_t *role)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment