diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-10-27 15:54:33 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-10-28 05:44:33 -0700 |
commit | b0a00cd15de4b255139fefde3da36c28bd0b31bc (patch) | |
tree | 4ee5c0946fe29da98cf8e34d9018fda1d9cbc3d2 /core/xmp_parser.cpp | |
parent | 81ea47a498b04e5f057e9d009fb73d9d559b37b5 (diff) | |
download | subsurface-b0a00cd15de4b255139fefde3da36c28bd0b31bc.tar.gz |
Cleanup: use helper to avoid NULL dereference
We have these helper functions for exactly this purpose.
Found by Coverity. Fixes CID 350129
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/xmp_parser.cpp')
-rw-r--r-- | core/xmp_parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/xmp_parser.cpp b/core/xmp_parser.cpp index c59e9a5bd..4ce6cef31 100644 --- a/core/xmp_parser.cpp +++ b/core/xmp_parser.cpp @@ -61,7 +61,7 @@ static timestamp_t extract_timestamp_from_attributes(const xmlNode *node) const xmlChar *ns = p->ns ? p->ns->prefix : nullptr; // Check for xmp::CreateDate property - if (!strcmp((const char *)ns, "xmp") && !strcmp((const char *)p->name, "CreateDate")) { + if (same_string((const char *)ns, "xmp") && same_string((const char *)p->name, "CreateDate")) { // We only support a single property value if (!p->children || !p->children->content) return 0; |