From: K.Kosako Date: Thu, 8 Jun 2017 06:36:57 +0000 (+0900) Subject: remove redandant cast X-Git-Tag: v6.4.0~1^2~128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33a7f70d9b3682ec39146297eaae8246b0c227be;p=onig remove redandant cast --- diff --git a/src/regcomp.c b/src/regcomp.c index 2853c1e..1d5da2f 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -1364,7 +1364,7 @@ compile_enclose_node(EncloseNode* node, regex_t* reg) r = add_opcode(reg, OP_CALL); if (r) return r; node->call_addr = BBUF_GET_OFFSET_POS(reg) + SIZE_ABSADDR + SIZE_OP_JUMP; - NODE_STATUS_SET((Node* )node, NST_ADDR_FIXED); + NODE_STATUS_SET(node, NST_ADDR_FIXED); r = add_abs_addr(reg, (int )node->call_addr); if (r) return r; len = compile_length_tree(NODE_ENCLOSE_BODY(node), reg); diff --git a/src/regparse.h b/src/regparse.h index bc50802..ad4a6dc 100644 --- a/src/regparse.h +++ b/src/regparse.h @@ -133,8 +133,8 @@ #define NST_BY_NUMBER (1<<14) /* {n,m} */ #define NODE_STATUS(node) (((Node* )node)->u.base.status) -#define NODE_STATUS_SET(node,f) ((node)->u.base.status |= (f)) -#define NODE_STATUS_CLEAR(node,f) ((node)->u.base.status &= ~(f)) +#define NODE_STATUS_SET(node,f) (NODE_STATUS(node) |= (f)) +#define NODE_STATUS_CLEAR(node,f) (NODE_STATUS(node) &= ~(f)) #define NODE_IS_BY_NUMBER(node) ((NODE_STATUS(node) & NST_BY_NUMBER) != 0) #define NODE_IS_IN_REPEAT(node) ((NODE_STATUS(node) & NST_IN_REPEAT) != 0)