diff options
author | Freya Murphy <freya@freyacat.org> | 2025-03-27 11:39:12 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-03-27 11:39:12 -0400 |
commit | 0ff301cda68669c59351e5854ce98f2cf460543f (patch) | |
tree | cfe8f976261962420ada64b821559b9da0a56841 /lib/strcat.c | |
parent | add compile_flags.txt for clangd lsp (diff) | |
download | comus-0ff301cda68669c59351e5854ce98f2cf460543f.tar.gz comus-0ff301cda68669c59351e5854ce98f2cf460543f.tar.bz2 comus-0ff301cda68669c59351e5854ce98f2cf460543f.zip |
pull upstream changes, add auto formatting
Diffstat (limited to 'lib/strcat.c')
-rw-r--r-- | lib/strcat.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/strcat.c b/lib/strcat.c index b0a8726..f7823bf 100644 --- a/lib/strcat.c +++ b/lib/strcat.c @@ -23,16 +23,17 @@ ** ** NOTE: assumes dst is large enough to hold the resulting string */ -char *strcat( register char *dst, register const char *src ) { +char *strcat(register char *dst, register const char *src) +{ register char *tmp = dst; - while( *dst ) // find the NUL + while (*dst) // find the NUL ++dst; - while( (*dst++ = *src++) ) // append the src string + while ((*dst++ = *src++)) // append the src string ; - return( tmp ); + return (tmp); } #endif |