(redo_diff): g_array_new() doesn't return NULL.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2023-08-27 13:44:49 +03:00
parent 5cb55be2a3
commit c3bc39814e
1 changed files with 9 additions and 11 deletions

View File

@ -1813,18 +1813,16 @@ redo_diff (WDiff * dview)
q = &g_array_index (dview->a[DIFF_RIGHT], DIFFLN, i);
if (p->line != 0 && q->line != 0 && p->ch == CHG_CH)
{
h = g_array_new (FALSE, FALSE, sizeof (BRACKET));
if (h != NULL)
{
gboolean runresult;
gboolean runresult;
runresult =
hdiff_scan (p->p, p->u.len, q->p, q->u.len, HDIFF_MINCTX, h, HDIFF_DEPTH);
if (!runresult)
{
g_array_free (h, TRUE);
h = NULL;
}
h = g_array_new (FALSE, FALSE, sizeof (BRACKET));
runresult =
hdiff_scan (p->p, p->u.len, q->p, q->u.len, HDIFF_MINCTX, h, HDIFF_DEPTH);
if (!runresult)
{
g_array_free (h, TRUE);
h = NULL;
}
}