Minor
diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc
index 709aa94..807c330 100644
--- a/src/hb-graphite2.cc
+++ b/src/hb-graphite2.cc
@@ -274,8 +274,8 @@
while ((DIV_CEIL (sizeof (hb_graphite2_cluster_t) * buffer->len, sizeof (*scratch)) +
DIV_CEIL (sizeof (hb_codepoint_t) * glyph_count, sizeof (*scratch))) > scratch_size)
{
- buffer->ensure (buffer->allocated * 2);
- if (unlikely (buffer->in_error)) {
+ if (unlikely (!buffer->ensure (buffer->allocated * 2)))
+ {
if (feats) gr_featureval_destroy (feats);
gr_seg_destroy (seg);
return false;
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index f335351..74ae3a3 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -903,8 +903,7 @@
FAIL ("ScriptShapeOpenType() set fNoGlyphIndex");
if (unlikely (hr == E_OUTOFMEMORY))
{
- buffer->ensure (buffer->allocated * 2);
- if (unlikely (buffer->in_error))
+ if (unlikely (!buffer->ensure (buffer->allocated * 2)))
FAIL ("Buffer resize failed");
goto retry;
}
@@ -973,8 +972,7 @@
#undef utf16_index
- buffer->ensure (glyphs_len);
- if (unlikely (buffer->in_error))
+ if (unlikely (!buffer->ensure (glyphs_len)))
FAIL ("Buffer in error");
#undef FAIL