gbase64: Remove an unnecessary condition

At that point in the code, len can only be 0, 1 or 2. The code below is
a no-op if (len == 0), so the condition is pointless.

Remove it, and we should be able to achieve full branch coverage of
gbase64.c.

This should introduce no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2019-02-27 11:20:14 +00:00
parent 387e762879
commit 2484d1c950

View File

@ -160,7 +160,8 @@ g_base64_encode_step (const guchar *in,
*state = already;
}
if (len>0)
g_assert (len == 0 || len == 1 || len == 2);
{
char *saveout;