summaryrefslogtreecommitdiff
path: root/lib/memclr.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-03-27 11:39:12 -0400
committerFreya Murphy <freya@freyacat.org>2025-03-27 11:39:12 -0400
commit0ff301cda68669c59351e5854ce98f2cf460543f (patch)
treecfe8f976261962420ada64b821559b9da0a56841 /lib/memclr.c
parentadd compile_flags.txt for clangd lsp (diff)
downloadcomus-0ff301cda68669c59351e5854ce98f2cf460543f.tar.gz
comus-0ff301cda68669c59351e5854ce98f2cf460543f.tar.bz2
comus-0ff301cda68669c59351e5854ce98f2cf460543f.zip
pull upstream changes, add auto formatting
Diffstat (limited to 'lib/memclr.c')
-rw-r--r--lib/memclr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/memclr.c b/lib/memclr.c
index 490fc6d..e839382 100644
--- a/lib/memclr.c
+++ b/lib/memclr.c
@@ -21,7 +21,8 @@
** @param buf The buffer to initialize
** @param len Buffer size (in bytes)
*/
-void memclr( void *buf, register uint32_t len ) {
+void memclr(void *buf, register uint32_t len)
+{
register uint8_t *dest = buf;
/*
@@ -29,8 +30,8 @@ void memclr( void *buf, register uint32_t len ) {
** words at a time (instead of bytes).
*/
- while( len-- ) {
- *dest++ = 0;
+ while (len--) {
+ *dest++ = 0;
}
}