From 42c183f80355fe7cadac2931a23d389285c8b98c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 27 Jul 2018 14:55:29 -0700 Subject: [PATCH] Minor --- src/hb-ft.cc | 5 +++-- src/hb-ot-shape.cc | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index 1026d682..f8a6b0c4 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -496,8 +496,9 @@ reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) return nullptr; error = FT_Load_Sfnt_Table (ft_face, tag, 0, buffer, &length); - if (error) { - free ((void*)buffer); + if (error) + { + free (buffer); return nullptr; } diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 70c9c63c..e40a0e94 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -193,8 +193,9 @@ _hb_ot_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan, if (plan->shaper->data_create) { plan->data = plan->shaper->data_create (plan); - if (unlikely (!plan->data)) { - free ((void*)plan); + if (unlikely (!plan->data)) + { + free (plan); return nullptr; } } -- GitLab