From: Dirk Lemstra Date: Sun, 17 Sep 2017 04:32:01 +0000 (+0200) Subject: Use the new GetRootValueFromSplayTree. X-Git-Tag: 7.0.7-3~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28009360e0b19dd4797dfa3ea446f946434356b0;p=imagemagick Use the new GetRootValueFromSplayTree. --- diff --git a/MagickCore/artifact.c b/MagickCore/artifact.c index b98c3601c..0dab41e5b 100644 --- a/MagickCore/artifact.c +++ b/MagickCore/artifact.c @@ -281,15 +281,11 @@ MagickExport const char *GetImageArtifact(const Image *image, if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); p=(const char *) NULL; - if (artifact == (const char *) NULL) - { - ResetSplayTreeIterator((SplayTreeInfo *) image->artifacts); - p=(const char *) GetNextValueInSplayTree((SplayTreeInfo *) - image->artifacts); - return(p); - } if (image->artifacts != (void *) NULL) { + if (artifact == (const char *) NULL) + return((const char *) GetRootValueFromSplayTree((SplayTreeInfo *) + image->artifacts)); p=(const char *) GetValueFromSplayTree((SplayTreeInfo *) image->artifacts, artifact); if (p != (const char *) NULL) diff --git a/MagickCore/property.c b/MagickCore/property.c index 9dc09ebe1..02da55579 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -2196,16 +2196,12 @@ MagickExport const char *GetImageProperty(const Image *image, if (image->properties != (void *) NULL) { if (property == (const char *) NULL) - { - ResetSplayTreeIterator((SplayTreeInfo *) image->properties); - p=(const char *) GetNextValueInSplayTree((SplayTreeInfo *) - image->properties); - return(p); - } - p=(const char *) GetValueFromSplayTree((SplayTreeInfo *) + return((const char *) GetRootValueFromSplayTree((SplayTreeInfo *) + image->properties)); + p=(const char *) GetValueFromSplayTree((SplayTreeInfo *) image->properties,property); - if (p != (const char *) NULL) - return(p); + if (p != (const char *) NULL) + return(p); } if ((property == (const char *) NULL) || (strchr(property,':') == (char *) NULL))