From 993d1e786a32612b796dae8309ce402a4121bec7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 12 Oct 2010 11:17:30 -0400 Subject: [PATCH] Fix missing negation in unreachable code! Mozilla bug #603346 --- src/hb-open-type-private.hh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index ea1d371ae..38ba3a3e6 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -587,7 +587,7 @@ struct GenericArrayOf * other structs. */ unsigned int count = len; for (unsigned int i = 0; i < count; i++) - if (array[i].sanitize (c)) + if (unlikely (!array[i].sanitize (c))) return false; return true; } @@ -697,9 +697,8 @@ struct HeadlessArrayOf * to do have a simple sanitize(), ie. they do not reference * other structs. */ unsigned int count = len ? len - 1 : 0; - Type *a = array; for (unsigned int i = 0; i < count; i++) - if (unlikely (!a[i].sanitize (c))) + if (unlikely (!array[i].sanitize (c))) return false; return true; }