diff options
author | Samuel Holland <samuel@sholland.org> | 2018-09-11 22:41:30 -0500 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2018-09-11 22:50:44 -0500 |
commit | 9bc7c737b311fcbba71af11884b7f9111dba57ba (patch) | |
tree | 6ad80501db199c916e8fc2ed5648bf694a257675 /libgcompat/string.c | |
parent | d8e667a638401df1bf881b16fcda6315f3fa3eb1 (diff) | |
download | gcompat-9bc7c737b311fcbba71af11884b7f9111dba57ba.tar.gz gcompat-9bc7c737b311fcbba71af11884b7f9111dba57ba.tar.bz2 gcompat-9bc7c737b311fcbba71af11884b7f9111dba57ba.tar.xz gcompat-9bc7c737b311fcbba71af11884b7f9111dba57ba.zip |
libgcompat: Fix formatting inconsistencies (clang-format)
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'libgcompat/string.c')
-rw-r--r-- | libgcompat/string.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libgcompat/string.c b/libgcompat/string.c index 9f1704b..f4e0620 100644 --- a/libgcompat/string.c +++ b/libgcompat/string.c @@ -2,10 +2,10 @@ #include <assert.h> /* assert */ #include <stddef.h> /* NULL, size_t */ #include <stdint.h> /* SIZE_MAX */ -#include <string.h> /* memcpy, strcpy, strncat, strndup */ #include <stdlib.h> /* rand_r */ -#include <unistd.h> /* getpid */ +#include <string.h> /* memcpy, strcpy, strncat, strndup */ #include <time.h> /* time */ +#include <unistd.h> /* getpid */ #include "alias.h" /* weak_alias */ @@ -189,8 +189,7 @@ size_t __strcspn_c2(const char *str, int bad, int bad2) { size_t length = 0; const char *s = str; - while(*s != bad && *s != bad2 && *s != '\0') - { + while (*s != bad && *s != bad2 && *s != '\0') { length++; s++; } @@ -285,7 +284,7 @@ char *strfry(char *s) if (!len) return s; - seed += time(NULL) ^ getpid() ^ (uintptr_t)s; + seed += time(NULL) ^ getpid() ^ (uintptr_t) s; for (i = 0; i < len - 1; ++i) { j = rand_r(&seed) % (len - i) + i; |