mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
81ea47a498
commit
b0a00cd15d
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue