mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +08:00
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
1 changed files with 13 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue