Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Oct 20, 2023
1 parent fc9222b commit 66871a5
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions magick/policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ static PolicyInfo *GetPolicyInfo(const char *name,ExceptionInfo *exception)
*q;

ElementInfo
*p,
*pp;
*p;

PolicyDomain
domain;
Expand Down Expand Up @@ -346,26 +345,18 @@ static PolicyInfo *GetPolicyInfo(const char *name,ExceptionInfo *exception)
policy=(PolicyInfo *) p->value;
return(policy);
}
pp=(ElementInfo *) NULL;
while (p != (ElementInfo *) NULL)
{
policy=(PolicyInfo *) p->value;
if ((domain == UndefinedPolicyDomain) || (policy->domain == domain))
if (LocaleCompare(policyname,policy->name) == 0)
{
if (pp == (ElementInfo *) NULL)
pp=p;
else
if (policy->domain == ResourcePolicyDomain)
if (StringToMagickSizeType(policy->value,100.0) < StringToMagickSizeType(((PolicyInfo *) pp->value)->value,100.0))
pp=p;
}
break;
p=p->next;
}
if (p == (ElementInfo *) NULL)
policy=(PolicyInfo *) NULL;
else
(void) SetHeadElementInLinkedList(policy_cache,pp);
(void) SetHeadElementInLinkedList(policy_cache,p);
UnlockSemaphoreInfo(policy_semaphore);
return(policy);
}
Expand Down

0 comments on commit 66871a5

Please sign in to comment.