From 28009360e0b19dd4797dfa3ea446f946434356b0 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sun, 17 Sep 2017 06:32:01 +0200 Subject: [PATCH] Use the new GetRootValueFromSplayTree. --- MagickCore/artifact.c | 10 +++------- MagickCore/property.c | 14 +++++--------- 2 files changed, 8 insertions(+), 16 deletions(-) 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)) -- 2.40.0