aboutsummaryrefslogtreecommitdiff
path: root/jerry-core
diff options
context:
space:
mode:
authorAkos Kiss <akiss@inf.u-szeged.hu>2018-08-05 15:41:58 +0200
committerLászló Langó <llango.u-szeged@partner.samsung.com>2018-08-05 15:41:58 +0200
commitc93bea32c43f507d88ac354ea411c714203ebb5a (patch)
tree66330e97cc497d3a2f62a5a0c1d629c2ac88ddcb /jerry-core
parent64051b5bd857985e67b4922ecc654f26144c5520 (diff)
Simplify redundant condition in jerry-snapshot.c (#2444)
Redundant condition: is_c_format. '!A || (A && B)' is equivalent to '!A || B'. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Diffstat (limited to 'jerry-core')
-rw-r--r--jerry-core/api/jerry-snapshot.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/jerry-core/api/jerry-snapshot.c b/jerry-core/api/jerry-snapshot.c
index 583685c7..5f96dd45 100644
--- a/jerry-core/api/jerry-snapshot.c
+++ b/jerry-core/api/jerry-snapshot.c
@@ -1640,8 +1640,7 @@ jerry_parse_and_save_literals (const jerry_char_t *source_p, /**< script source
* Save all of the literals in C format as well.
*/
if (ecma_get_string_magic (literal_p) == LIT_MAGIC_STRING__COUNT
- && (!is_c_format
- || (is_c_format && ecma_string_is_valid_identifier (literal_p))))
+ && (!is_c_format || ecma_string_is_valid_identifier (literal_p)))
{
literal_count++;
}
@@ -1679,8 +1678,7 @@ jerry_parse_and_save_literals (const jerry_char_t *source_p, /**< script source
* Save all of the literals in C format as well.
*/
if (ecma_get_string_magic (literal_p) == LIT_MAGIC_STRING__COUNT
- && (!is_c_format
- || (is_c_format && ecma_string_is_valid_identifier (literal_p))))
+ && (!is_c_format || ecma_string_is_valid_identifier (literal_p)))
{
literal_array[literal_idx++] = literal_p;
}