Skip to content

Commit 79132d5

Browse files
committed
Format them all
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo [email protected]
1 parent 4213eac commit 79132d5

29 files changed

+59
-100
lines changed

jerry-core/api/jerryscript.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -6583,10 +6583,8 @@ typedef struct
65836583
* List of TypedArray mappings
65846584
*/
65856585
static jerry_typedarray_mapping_t jerry_typedarray_mappings[] = {
6586-
#define TYPEDARRAY_ENTRY(NAME, LIT_NAME, SIZE_SHIFT) \
6587-
{ \
6588-
JERRY_TYPEDARRAY_##NAME, ECMA_BUILTIN_ID_##NAME##ARRAY_PROTOTYPE, ECMA_##LIT_NAME##_ARRAY, SIZE_SHIFT \
6589-
}
6586+
#define TYPEDARRAY_ENTRY(NAME, LIT_NAME, SIZE_SHIFT) \
6587+
{ JERRY_TYPEDARRAY_##NAME, ECMA_BUILTIN_ID_##NAME##ARRAY_PROTOTYPE, ECMA_##LIT_NAME##_ARRAY, SIZE_SHIFT }
65906588

65916589
TYPEDARRAY_ENTRY (UINT8, UINT8, 0), TYPEDARRAY_ENTRY (UINT8CLAMPED, UINT8_CLAMPED, 0),
65926590
TYPEDARRAY_ENTRY (INT8, INT8, 0), TYPEDARRAY_ENTRY (UINT16, UINT16, 1),

jerry-core/ecma/base/ecma-globals.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ typedef struct
569569
* Checks whether a property is raw data property (should only be used in assertions)
570570
*/
571571
#define ECMA_PROPERTY_IS_RAW_DATA(property) \
572-
(((property) &ECMA_PROPERTY_FLAG_DATA) && (property) < ECMA_PROPERTY_INTERNAL)
572+
(((property) & ECMA_PROPERTY_FLAG_DATA) && (property) < ECMA_PROPERTY_INTERNAL)
573573

574574
/**
575575
* Create internal property.
@@ -1337,7 +1337,7 @@ typedef double ecma_number_t;
13371337
/**
13381338
* Value '-1' of ecma_number_t
13391339
*/
1340-
#define ECMA_NUMBER_MINUS_ONE ((ecma_number_t) -1.0f)
1340+
#define ECMA_NUMBER_MINUS_ONE ((ecma_number_t) - 1.0f)
13411341

13421342
/**
13431343
* Maximum number of characters in string representation of ecma-number
@@ -1603,7 +1603,7 @@ typedef struct
16031603
* Set the size of an ecma ASCII string
16041604
*/
16051605
#define ECMA_ASCII_STRING_SET_SIZE(string_p, size) \
1606-
(*((lit_utf8_byte_t *) (string_p) + sizeof (ecma_string_t)) = (uint8_t) ((size) -1))
1606+
(*((lit_utf8_byte_t *) (string_p) + sizeof (ecma_string_t)) = (uint8_t) ((size) - 1))
16071607

16081608
/**
16091609
* Get the start position of the string buffer of an ecma ASCII string

jerry-core/ecma/base/ecma-helpers-number.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ ecma_number_t ecma_number_create (bool sign, uint32_t biased_exp, uint64_t fract
130130
*
131131
* See also: ECMA_262 v6, 20.1.2.8
132132
*/
133-
#define ECMA_NUMBER_MIN_SAFE_INTEGER ((ecma_number_t) -0x1FFFFFFFFFFFFF)
133+
#define ECMA_NUMBER_MIN_SAFE_INTEGER ((ecma_number_t) - 0x1FFFFFFFFFFFFF)
134134

135135
/**
136136
* Number.MAX_VALUE exponent part

jerry-core/ecma/base/ecma-property-hashmap.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ static const uint8_t ecma_property_hashmap_steps[ECMA_PROPERTY_HASHMAP_NUMBER_OF
5151
/**
5252
* Get the value of a bit in a bitmap.
5353
*/
54-
#define ECMA_PROPERTY_HASHMAP_GET_BIT(byte_p, index) ((byte_p)[(index) >> 3] & (1 << ((index) &0x7)))
54+
#define ECMA_PROPERTY_HASHMAP_GET_BIT(byte_p, index) ((byte_p)[(index) >> 3] & (1 << ((index) & 0x7)))
5555

5656
/**
5757
* Clear the value of a bit in a bitmap.
5858
*/
5959
#define ECMA_PROPERTY_HASHMAP_CLEAR_BIT(byte_p, index) \
60-
((byte_p)[(index) >> 3] = (uint8_t) ((byte_p)[(index) >> 3] & ~(1 << ((index) &0x7))))
60+
((byte_p)[(index) >> 3] = (uint8_t) ((byte_p)[(index) >> 3] & ~(1 << ((index) & 0x7))))
6161

6262
/**
6363
* Set the value of a bit in a bitmap.
6464
*/
6565
#define ECMA_PROPERTY_HASHMAP_SET_BIT(byte_p, index) \
66-
((byte_p)[(index) >> 3] = (uint8_t) ((byte_p)[(index) >> 3] | (1 << ((index) &0x7))))
66+
((byte_p)[(index) >> 3] = (uint8_t) ((byte_p)[(index) >> 3] | (1 << ((index) & 0x7))))
6767

6868
/**
6969
* Create a new property hashmap for the object.

jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-prototype.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ enum
6363
* Convert routine type to operation type.
6464
*/
6565
#define ECMA_ASYNC_GENERATOR_ROUTINE_TO_OPERATION(type) \
66-
((ecma_async_generator_operation_type_t) ((type) -ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT))
66+
((ecma_async_generator_operation_type_t) ((type) - ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT))
6767

6868
JERRY_STATIC_ASSERT (ECMA_ASYNC_GENERATOR_ROUTINE_TO_OPERATION (ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT)
6969
== ECMA_ASYNC_GENERATOR_DO_NEXT,

jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* Checks whether the function uses UTC time zone.
4040
*/
4141
#define BUILTIN_DATE_FUNCTION_IS_UTC(builtin_routine_id) \
42-
(((builtin_routine_id) -ECMA_DATE_PROTOTYPE_GET_FULL_YEAR) & 0x1)
42+
(((builtin_routine_id) - ECMA_DATE_PROTOTYPE_GET_FULL_YEAR) & 0x1)
4343

4444
/**
4545
* List of built-in routine identifiers.

jerry-core/ecma/builtin-objects/ecma-builtin-generator-prototype.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ enum
6161
* Convert routine type to operation type.
6262
*/
6363
#define ECMA_GENERATOR_ROUTINE_TO_OPERATION(type) \
64-
((ecma_iterator_command_type_t) ((type) -ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT))
64+
((ecma_iterator_command_type_t) ((type) - ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT))
6565

6666
JERRY_STATIC_ASSERT (ECMA_GENERATOR_ROUTINE_TO_OPERATION (ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT) == ECMA_ITERATOR_NEXT,
6767
convert_ecma_generator_routine_next_to_ecma_iterator_next_failed);

jerry-core/ecma/builtin-objects/ecma-builtins.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ typedef enum
5757
/**
5858
* Get routine length
5959
*/
60-
#define ECMA_GET_ROUTINE_LENGTH(value) ((uint8_t) ((value) &0xf))
60+
#define ECMA_GET_ROUTINE_LENGTH(value) ((uint8_t) ((value) & 0xf))
6161

6262
/**
6363
* Get routine ID
@@ -72,7 +72,7 @@ typedef enum
7272
/**
7373
* Get accessor setter ID
7474
*/
75-
#define ECMA_ACCESSOR_READ_WRITE_GET_SETTER_ID(value) ((uint8_t) ((value) &0xff))
75+
#define ECMA_ACCESSOR_READ_WRITE_GET_SETTER_ID(value) ((uint8_t) ((value) & 0xff))
7676

7777
/**
7878
* Get accessor getter ID

jerry-core/ecma/operations/ecma-big-uint.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ typedef enum
7575
/**
7676
* Returns with the type of the operation.
7777
*/
78-
#define ECMA_BIGINT_BITWISE_GET_OPERATION_TYPE(operation_and_options) ((operation_and_options) &0xf)
78+
#define ECMA_BIGINT_BITWISE_GET_OPERATION_TYPE(operation_and_options) ((operation_and_options) & 0xf)
7979

8080
/**
8181
* Options for bitwise operations.

jerry-core/ecma/operations/ecma-bigint.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ ecma_bigint_to_string (ecma_value_t value, /**< BigInt value */
250250
/**
251251
* Get the size of zero digits from the result of ecma_bigint_number_to_digits
252252
*/
253-
#define ECMA_BIGINT_NUMBER_TO_DIGITS_GET_ZERO_SIZE(value) (((value) &0xffff) * (uint32_t) sizeof (ecma_bigint_digit_t))
253+
#define ECMA_BIGINT_NUMBER_TO_DIGITS_GET_ZERO_SIZE(value) (((value) & 0xffff) * (uint32_t) sizeof (ecma_bigint_digit_t))
254254

255255
/**
256256
* Get the number of digits from the result of ecma_bigint_number_to_digits

jerry-core/jmem/jmem-heap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
/**
5252
* Get heap offset from address
5353
*/
54-
#define JMEM_HEAP_GET_OFFSET_FROM_ADDR(p) ((uint32_t) ((uint8_t *) (p) -JERRY_HEAP_CONTEXT (area)))
54+
#define JMEM_HEAP_GET_OFFSET_FROM_ADDR(p) ((uint32_t) ((uint8_t *) (p) - JERRY_HEAP_CONTEXT (area)))
5555

5656
/**
5757
* Get heap address from offset

jerry-core/jrt/jrt.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ void jerry_jrt_set_log_level (jerry_log_level_t level);
173173
*
174174
* Returns minimum positive value, that divides @a alignment and is more than or equal to @a value
175175
*/
176-
#define JERRY_ALIGNUP(value, alignment) (((value) + ((alignment) -1)) & ~((alignment) -1))
176+
#define JERRY_ALIGNUP(value, alignment) (((value) + ((alignment) - 1)) & ~((alignment) - 1))
177177

178178
/**
179179
* Align value down
180180
*/
181-
#define JERRY_ALIGNDOWN(value, alignment) ((value) & ~((alignment) -1))
181+
#define JERRY_ALIGNDOWN(value, alignment) ((value) & ~((alignment) - 1))
182182

183183
/*
184184
* min, max

jerry-core/parser/js/byte-code.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@
169169
CBC_OPCODE (name##_2, CBC_HAS_BRANCH_ARG, stack, (vm_oc) | VM_OC_GET_BRANCH | VM_OC_BACKWARD_BRANCH) \
170170
CBC_OPCODE (name##_3, CBC_HAS_BRANCH_ARG, stack, (vm_oc) | VM_OC_GET_BRANCH | VM_OC_BACKWARD_BRANCH)
171171

172-
#define CBC_BRANCH_OFFSET_LENGTH(opcode) ((opcode) &0x3)
172+
#define CBC_BRANCH_OFFSET_LENGTH(opcode) ((opcode) & 0x3)
173173

174-
#define CBC_BRANCH_IS_BACKWARD(flags) (!((flags) &CBC_FORWARD_BRANCH_ARG))
174+
#define CBC_BRANCH_IS_BACKWARD(flags) (!((flags) & CBC_FORWARD_BRANCH_ARG))
175175

176-
#define CBC_BRANCH_IS_FORWARD(flags) ((flags) &CBC_FORWARD_BRANCH_ARG)
176+
#define CBC_BRANCH_IS_FORWARD(flags) ((flags) & CBC_FORWARD_BRANCH_ARG)
177177

178178
/* Stack consumption of opcodes with context. */
179179

@@ -1003,13 +1003,13 @@ typedef struct
10031003
* Get function arguments.
10041004
*/
10051005
#define CBC_SCRIPT_GET_FUNCTION_ARGUMENTS(script_p, type) \
1006-
(CBC_SCRIPT_GET_OPTIONAL_VALUES (script_p)[((type) &CBC_SCRIPT_HAS_USER_VALUE) ? 1 : 0])
1006+
(CBC_SCRIPT_GET_OPTIONAL_VALUES (script_p)[((type) & CBC_SCRIPT_HAS_USER_VALUE) ? 1 : 0])
10071007

10081008
/**
10091009
* Get import.meta object.
10101010
*/
10111011
#define CBC_SCRIPT_GET_IMPORT_META(script_p, type) \
1012-
(CBC_SCRIPT_GET_OPTIONAL_VALUES (script_p)[((type) &CBC_SCRIPT_HAS_USER_VALUE) ? 1 : 0])
1012+
(CBC_SCRIPT_GET_OPTIONAL_VALUES (script_p)[((type) & CBC_SCRIPT_HAS_USER_VALUE) ? 1 : 0])
10131013

10141014
#define CBC_OPCODE(arg1, arg2, arg3, arg4) arg1,
10151015

jerry-core/parser/js/js-lexer.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ JERRY_STATIC_ASSERT (LEXER_NUMBER_BINARY > LEXER_NUMBER_OCTAL,
4141
/**
4242
* Check whether the UTF-8 intermediate is an octet or not
4343
*/
44-
#define IS_UTF8_INTERMEDIATE_OCTET(byte) (((byte) &LIT_UTF8_EXTRA_BYTE_MASK) == LIT_UTF8_2_BYTE_CODE_POINT_MIN)
44+
#define IS_UTF8_INTERMEDIATE_OCTET(byte) (((byte) & LIT_UTF8_EXTRA_BYTE_MASK) == LIT_UTF8_2_BYTE_CODE_POINT_MIN)
4545

4646
/**
4747
* Align column to the next tab position.
@@ -441,10 +441,7 @@ typedef struct
441441
* @{
442442
* Keyword defines
443443
*/
444-
#define LEXER_KEYWORD(name, type) \
445-
{ \
446-
(const uint8_t *) (name), (type) \
447-
}
444+
#define LEXER_KEYWORD(name, type) { (const uint8_t *) (name), (type) }
448445
#define LEXER_KEYWORD_LIST_LENGTH(name) (const uint8_t) (sizeof ((name)) / sizeof ((name)[0]))
449446
/** @} */
450447

jerry-core/parser/js/js-lexer.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,14 @@ typedef enum
241241
#define LEXER_IS_RIGHT_BRACKET(type) \
242242
((type) == LEXER_RIGHT_BRACE || (type) == LEXER_RIGHT_PAREN || (type) == LEXER_RIGHT_SQUARE)
243243

244-
#define LEXER_UNARY_OP_TOKEN_TO_OPCODE(token_type) ((((token_type) -LEXER_PLUS) * 2) + CBC_PLUS)
244+
#define LEXER_UNARY_OP_TOKEN_TO_OPCODE(token_type) ((((token_type) - LEXER_PLUS) * 2) + CBC_PLUS)
245245

246-
#define LEXER_UNARY_LVALUE_OP_TOKEN_TO_OPCODE(token_type) ((((token_type) -LEXER_INCREASE) * 6) + CBC_PRE_INCR)
246+
#define LEXER_UNARY_LVALUE_OP_TOKEN_TO_OPCODE(token_type) ((((token_type) - LEXER_INCREASE) * 6) + CBC_PRE_INCR)
247247

248-
#define LEXER_BINARY_OP_TOKEN_TO_OPCODE(token_type) ((uint16_t) ((((token_type) -LEXER_BIT_OR) * 3) + CBC_BIT_OR))
248+
#define LEXER_BINARY_OP_TOKEN_TO_OPCODE(token_type) ((uint16_t) ((((token_type) - LEXER_BIT_OR) * 3) + CBC_BIT_OR))
249249

250250
#define LEXER_BINARY_LVALUE_OP_TOKEN_TO_OPCODE(token_type) \
251-
((cbc_opcode_t) ((((token_type) -LEXER_ASSIGN_ADD) * 2) + CBC_ASSIGN_ADD))
251+
((cbc_opcode_t) ((((token_type) - LEXER_ASSIGN_ADD) * 2) + CBC_ASSIGN_ADD))
252252

253253
/**
254254
* Maximum local buffer size for identifiers which contains escape sequences.

jerry-core/parser/js/js-parser-internal.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ typedef enum
194194
* Get class option bits from ecma_parse_opts_t
195195
*/
196196
#define PARSER_RESTORE_STATUS_FLAGS(opts) \
197-
(((opts) &PARSER_RESTORE_STATUS_FLAGS_MASK) << PARSER_RESTORE_STATUS_FLAGS_SHIFT)
197+
(((opts) & PARSER_RESTORE_STATUS_FLAGS_MASK) << PARSER_RESTORE_STATUS_FLAGS_SHIFT)
198198

199199
/**
200200
* All flags that affect exotic arguments object creation.
@@ -215,7 +215,7 @@ typedef enum
215215

216216
/* Checks whether unmapped arguments are needed. */
217217
#define PARSER_NEEDS_MAPPED_ARGUMENTS(status_flags) \
218-
(((status_flags) &PARSER_ARGUMENTS_RELATED_FLAGS) == PARSER_ARGUMENTS_NEEDED)
218+
(((status_flags) & PARSER_ARGUMENTS_RELATED_FLAGS) == PARSER_ARGUMENTS_NEEDED)
219219

220220
/* The maximum of PARSER_CBC_STREAM_PAGE_SIZE is 127. */
221221
#define PARSER_CBC_STREAM_PAGE_SIZE ((uint32_t) (64 - sizeof (void *)))
@@ -245,7 +245,7 @@ typedef struct
245245
#define PARSER_CBC_UNAVAILABLE CBC_EXT_OPCODE
246246

247247
#define PARSER_TO_EXT_OPCODE(opcode) ((uint16_t) ((opcode) + 256))
248-
#define PARSER_GET_EXT_OPCODE(opcode) ((opcode) -256)
248+
#define PARSER_GET_EXT_OPCODE(opcode) ((opcode) - 256)
249249
#define PARSER_IS_BASIC_OPCODE(opcode) ((opcode) < 256)
250250
#define PARSER_IS_PUSH_LITERAL(opcode) \
251251
((opcode) == CBC_PUSH_LITERAL || (opcode) == CBC_PUSH_TWO_LITERALS || (opcode) == CBC_PUSH_THREE_LITERALS)

jerry-core/parser/js/js-scanner-internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ typedef enum
303303
/**
304304
* Setting the generator and async properties of literal pool status flags.
305305
*/
306-
#define SCANNER_FROM_COMPUTED_TO_LITERAL_POOL(mode) (((mode) -SCAN_STACK_COMPUTED_PROPERTY) << 10)
306+
#define SCANNER_FROM_COMPUTED_TO_LITERAL_POOL(mode) (((mode) - SCAN_STACK_COMPUTED_PROPERTY) << 10)
307307

308308
/**
309309
* Literal pool which may contains function argument identifiers

jerry-core/vm/vm-stack.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
/**
4141
* Get type of a vm context.
4242
*/
43-
#define VM_GET_CONTEXT_TYPE(value) ((vm_stack_context_type_t) ((value) &0x1f))
43+
#define VM_GET_CONTEXT_TYPE(value) ((vm_stack_context_type_t) ((value) & 0x1f))
4444

4545
/**
4646
* Get the end position of a vm context.

jerry-core/vm/vm.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
/**
6262
* Generate the binary representation of a "get arguments" opcode.
6363
*/
64-
#define VM_OC_GET_ARGS_CREATE_INDEX(V) (((V) &VM_OC_GET_ARGS_MASK) << VM_OC_GET_ARGS_SHIFT)
64+
#define VM_OC_GET_ARGS_CREATE_INDEX(V) (((V) & VM_OC_GET_ARGS_MASK) << VM_OC_GET_ARGS_SHIFT)
6565

6666
/**
6767
* Extract the "get arguments" opcode.
@@ -98,7 +98,7 @@ typedef enum
9898
/**
9999
* Extract the "group" opcode.
100100
*/
101-
#define VM_OC_GROUP_GET_INDEX(O) ((O) &VM_OC_GROUP_MASK)
101+
#define VM_OC_GROUP_GET_INDEX(O) ((O) & VM_OC_GROUP_MASK)
102102

103103
/**
104104
* Opcodes.
@@ -377,7 +377,7 @@ typedef enum
377377
/**
378378
* Generate a "put result" opcode flag bit.
379379
*/
380-
#define VM_OC_PUT_RESULT_CREATE_FLAG(V) (((V) &VM_OC_PUT_RESULT_MASK) << VM_OC_PUT_RESULT_SHIFT)
380+
#define VM_OC_PUT_RESULT_CREATE_FLAG(V) (((V) & VM_OC_PUT_RESULT_MASK) << VM_OC_PUT_RESULT_SHIFT)
381381

382382
/**
383383
* Checks whether the result is stored somewhere.

jerry-ext/include/jerryscript-ext/module.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ typedef struct jerryx_native_module_t
6262
#pragma section(".CRT$XCU", read)
6363
#pragma section(".CRT$XTU", read)
6464

65-
#define JERRYX_MSVC_FUNCTION_ON_SECTION(sec_name, f) \
66-
static void f (void); \
67-
__pragma (JERRYX_MSVC_INCLUDE_SYM (f##_section)) __declspec (allocate (sec_name)) \
68-
JERRYX_MSCV_EXTERN_C void (*f##_section) (void) = f; \
65+
#define JERRYX_MSVC_FUNCTION_ON_SECTION(sec_name, f) \
66+
static void f (void); \
67+
__pragma (JERRYX_MSVC_INCLUDE_SYM (f##_section)) \
68+
__declspec (allocate (sec_name)) JERRYX_MSCV_EXTERN_C void (*f##_section) (void) = f; \
6969
static void f (void)
7070

7171
#define JERRYX_MODULE_CONSTRUCTOR(f) JERRYX_MSVC_FUNCTION_ON_SECTION (".CRT$XCU", f)

jerry-main/arguments/cli.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ typedef struct
6262
/**
6363
* Macro for writing command line option definition struct literals.
6464
*/
65-
#define CLI_OPT_DEF(...) /*(cli_opt_t)*/ \
66-
{ \
67-
__VA_ARGS__ \
68-
}
65+
#define CLI_OPT_DEF(...) /*(cli_opt_t)*/ { __VA_ARGS__ }
6966

7067
/*
7168
* Functions for CLI.

jerry-port/common/jerry-port-fs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <sys/stat.h>
2424

2525
#ifndef S_ISDIR
26-
#define S_ISDIR(mode) (((mode) &S_IFMT) == S_IFDIR)
26+
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
2727
#endif /* !defined(S_ISDIR) */
2828
#endif /* __GLIBC__ */
2929

tests/unit-core/test-api-binary-operations-arithmetics.c

+2-8
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,9 @@
1717

1818
#include "test-common.h"
1919

20-
#define T(op, lhs, rhs, res) \
21-
{ \
22-
op, lhs, rhs, res \
23-
}
20+
#define T(op, lhs, rhs, res) { op, lhs, rhs, res }
2421

25-
#define T_NAN(op, lhs, rhs) \
26-
{ \
27-
op, lhs, rhs \
28-
}
22+
#define T_NAN(op, lhs, rhs) { op, lhs, rhs }
2923

3024
#define T_ERR(op, lsh, rhs) T_NAN (op, lsh, rhs)
3125

tests/unit-core/test-api-binary-operations-comparisons.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717

1818
#include "test-common.h"
1919

20-
#define T(op, lhs, rhs, res) \
21-
{ \
22-
op, lhs, rhs, res \
23-
}
20+
#define T(op, lhs, rhs, res) { op, lhs, rhs, res }
2421

2522
typedef struct
2623
{

tests/unit-core/test-api-binary-operations-instanceof.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717

1818
#include "test-common.h"
1919

20-
#define T(lhs, rhs, res) \
21-
{ \
22-
lhs, rhs, res \
23-
}
20+
#define T(lhs, rhs, res) { lhs, rhs, res }
2421

2522
typedef struct
2623
{

tests/unit-core/test-api-functiontype.c

+3-9
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,9 @@ typedef struct
2626
bool is_async;
2727
} test_entry_t;
2828

29-
#define ENTRY(TYPE, VALUE) \
30-
{ \
31-
TYPE, VALUE, true, false \
32-
}
33-
#define ENTRY_IF(TYPE, VALUE, FEATURE, ASYNC) \
34-
{ \
35-
TYPE, VALUE, jerry_feature_enabled (FEATURE), ASYNC \
36-
}
37-
#define EVALUATE(BUFF) (jerry_eval ((BUFF), sizeof ((BUFF)) - 1, JERRY_PARSE_NO_OPTS))
29+
#define ENTRY(TYPE, VALUE) { TYPE, VALUE, true, false }
30+
#define ENTRY_IF(TYPE, VALUE, FEATURE, ASYNC) { TYPE, VALUE, jerry_feature_enabled (FEATURE), ASYNC }
31+
#define EVALUATE(BUFF) (jerry_eval ((BUFF), sizeof ((BUFF)) - 1, JERRY_PARSE_NO_OPTS))
3832
static jerry_value_t
3933
test_ext_function (const jerry_call_info_t *call_info_p, /**< call information */
4034
const jerry_value_t args_p[], /**< array of arguments */

0 commit comments

Comments
 (0)