libc/net: Fix indent issue in lib_base64.c
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
09568c6147
commit
f84d35de50
@ -66,20 +66,20 @@ int b64_ntop(FAR const unsigned char *src, size_t srclen,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
*target++ = g_base64[src[0] >> 2];
|
*target++ = g_base64[src[0] >> 2];
|
||||||
if (srclen == 1)
|
if (srclen == 1)
|
||||||
{
|
{
|
||||||
*target++ = g_base64[(src[0] & 0x03) << 4];
|
*target++ = g_base64[(src[0] & 0x03) << 4];
|
||||||
*target++ = g_pad64;
|
*target++ = g_pad64;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*target++ = g_base64[((src[0] & 0x03) << 4) + (src[1] >> 4)];
|
*target++ = g_base64[((src[0] & 0x03) << 4) + (src[1] >> 4)];
|
||||||
*target++ = g_base64[(src[1] & 0x0f) << 2];
|
*target++ = g_base64[(src[1] & 0x0f) << 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
*target++ = g_pad64;
|
*target++ = g_pad64;
|
||||||
}
|
}
|
||||||
|
|
||||||
*target = '\0';
|
*target = '\0';
|
||||||
return datalen;
|
return datalen;
|
||||||
|
Loading…
Reference in New Issue
Block a user