diff options
author | Keith Packard <keithp@keithp.com> | 2002-08-07 01:45:59 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2002-08-07 01:45:59 +0000 |
commit | bd724c85969f7c24cf17b8780217c5a428555ea4 (patch) | |
tree | 2d453261617a3601225a8a52eb25f856d341b903 | |
parent | 0e344dec0b124c38e6193cc4208e06662acd32f1 (diff) | |
download | fontconfig-bd724c85969f7c24cf17b8780217c5a428555ea4.tar.gz |
Short circuit FcPatternEqual when both args point at the same pattern
-rw-r--r-- | src/fcpat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fcpat.c b/src/fcpat.c index 807b9fb..62d779b 100644 --- a/src/fcpat.c +++ b/src/fcpat.c @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/fontconfig/src/fcpat.c,v 1.10 2002/06/29 20:31:02 keithp Exp $ + * $XFree86: xc/lib/fontconfig/src/fcpat.c,v 1.11 2002/07/06 23:47:44 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -338,6 +338,9 @@ FcPatternEqual (const FcPattern *pa, const FcPattern *pb) { int i; + if (pa == pb) + return FcTrue; + if (pa->num != pb->num) return FcFalse; for (i = 0; i < pa->num; i++) |