clang-format the files

This commit is contained in:
dota17
2020-03-28 10:25:00 +08:00
parent c117d8a8a8
commit 8b162c4b89
54 changed files with 2860 additions and 2713 deletions

View File

@@ -5,7 +5,8 @@
* Override strerror() to get consistent output across platforms.
*/
static struct {
static struct
{
int errno_value;
const char *errno_str;
} errno_list[] = {
@@ -78,7 +79,8 @@ char *_json_c_strerror(int errno_in)
if (errno_list[ii].errno_value != errno_in)
continue;
for (start_idx = sizeof(PREFIX) - 1, jj = 0; errno_str[jj] != '\0'; jj++, start_idx++)
for (start_idx = sizeof(PREFIX) - 1, jj = 0; errno_str[jj] != '\0';
jj++, start_idx++)
{
errno_buf[start_idx] = errno_str[jj];
}
@@ -94,10 +96,9 @@ char *_json_c_strerror(int errno_in)
digbuf[ii] = "0123456789"[(errno_in % 10)];
// Reverse the digits
for (start_idx = sizeof(PREFIX) - 1 ; ii >= 0; ii--, start_idx++)
for (start_idx = sizeof(PREFIX) - 1; ii >= 0; ii--, start_idx++)
{
errno_buf[start_idx] = digbuf[ii];
}
return errno_buf;
}