gbase64: Fix an impossible condition

len is unsigned, so it’s not possible for it to be less than zero.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2019-02-27 10:27:43 +00:00
parent ff76f6920e
commit f9dfddf8eb

View File

@ -105,7 +105,7 @@ g_base64_encode_step (const guchar *in,
g_return_val_if_fail (state != NULL, 0);
g_return_val_if_fail (save != NULL, 0);
if (len <= 0)
if (len == 0)
return 0;
inptr = in;
@ -339,7 +339,7 @@ g_base64_decode_step (const gchar *in,
g_return_val_if_fail (state != NULL, 0);
g_return_val_if_fail (save != NULL, 0);
if (len <= 0)
if (len == 0)
return 0;
inend = (const guchar *)in+len;