libc/net: Fix indent issue in lib_base64.c

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2024-07-26 23:13:10 +08:00 committed by Xiang Xiao
parent 09568c6147
commit f84d35de50

View file

@ -66,20 +66,20 @@ int b64_ntop(FAR const unsigned char *src, size_t srclen,
return -1;
}
*target++ = g_base64[src[0] >> 2];
if (srclen == 1)
{
*target++ = g_base64[(src[0] & 0x03) << 4];
*target++ = g_pad64;
}
else
{
*target++ = g_base64[((src[0] & 0x03) << 4) + (src[1] >> 4)];
*target++ = g_base64[(src[1] & 0x0f) << 2];
}
*target++ = g_base64[src[0] >> 2];
if (srclen == 1)
{
*target++ = g_base64[(src[0] & 0x03) << 4];
*target++ = g_pad64;
}
else
{
*target++ = g_base64[((src[0] & 0x03) << 4) + (src[1] >> 4)];
*target++ = g_base64[(src[1] & 0x0f) << 2];
}
*target++ = g_pad64;
}
*target++ = g_pad64;
}
*target = '\0';
return datalen;