Use strcmp instead of direct comparison

GCC-7 doesn't like it when comparing string literal with something that might not be and throws Werror.
This commit is contained in:
jw
2018-02-26 08:49:32 -08:00
committed by GitHub
parent 478f360381
commit 88674453ce
+4 -4
View File
@@ -588,7 +588,7 @@
"marker": "if (height() > 202612)", "marker": "if (height() > 202612)",
"parameters": { "parameters": {
"text": [ "text": [
" if (height() > 202612 && CRYPTONOTE_NAME == \"monero\")" " if (height() > 202612 && strcmp(CRYPTONOTE_NAME, \"monero\")) == 0)"
] ]
} }
}, },
@@ -598,7 +598,7 @@
"marker": "if (height() > 685498)", "marker": "if (height() > 685498)",
"parameters": { "parameters": {
"text": [ "text": [
" if (height() > 685498 && CRYPTONOTE_NAME == \"monero\")" " if (height() > 685498 && strcmp(CRYPTONOTE_NAME, \"monero\")) == 0)"
] ]
} }
} }
@@ -613,7 +613,7 @@
"marker": "if (string_tools::pod_to_hex(block_blob_hash) == correct_blob_hash_202612)", "marker": "if (string_tools::pod_to_hex(block_blob_hash) == correct_blob_hash_202612)",
"parameters": { "parameters": {
"text": [ "text": [
" if (string_tools::pod_to_hex(block_blob_hash) == correct_blob_hash_202612 && CRYPTONOTE_NAME == \"monero\")" " if (string_tools::pod_to_hex(block_blob_hash) == correct_blob_hash_202612 && strcmp(CRYPTONOTE_NAME, \"monero\")) == 0"
] ]
} }
}, },
@@ -623,7 +623,7 @@
"marker": "if (string_tools::pod_to_hex(res) == existing_block_id_202612)", "marker": "if (string_tools::pod_to_hex(res) == existing_block_id_202612)",
"parameters": { "parameters": {
"text": [ "text": [
" if (string_tools::pod_to_hex(res) == existing_block_id_202612 && CRYPTONOTE_NAME == \"monero\")" " if (string_tools::pod_to_hex(res) == existing_block_id_202612 && strcmp(CRYPTONOTE_NAME, \"monero\")) == 0)"
] ]
} }
} }