clang-format

This commit is contained in:
2024-09-10 13:03:02 -04:00
parent 53c617d779
commit d66450e427
381 changed files with 28864 additions and 34170 deletions

View File

@@ -34,17 +34,15 @@
* their sort order.
*/
int
memcmp(const void *av, const void *bv, size_t len)
{
const unsigned char *a = av;
const unsigned char *b = bv;
size_t i;
int memcmp(const void *av, const void *bv, size_t len) {
const unsigned char *a = av;
const unsigned char *b = bv;
size_t i;
for (i=0; i<len; i++) {
if (a[i] != b[i]) {
return (int)(a[i] - b[i]);
}
}
return 0;
for (i = 0; i < len; i++) {
if (a[i] != b[i]) {
return (int)(a[i] - b[i]);
}
}
return 0;
}

View File

@@ -33,11 +33,9 @@
/*
* Standard C function to return a string for a given errno.
*/
const char *
strerror(int errcode)
{
if (errcode>=0 && errcode < sys_nerr) {
return sys_errlist[errcode];
}
return "Unknown error number";
const char *strerror(int errcode) {
if (errcode >= 0 && errcode < sys_nerr) {
return sys_errlist[errcode];
}
return "Unknown error number";
}

View File

@@ -31,8 +31,6 @@
static char *__strtok_context;
char *
strtok(char *str, const char *seps)
{
return strtok_r(str, seps, &__strtok_context);
char *strtok(char *str, const char *seps) {
return strtok_r(str, seps, &__strtok_context);
}