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/cvtoct.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/cvtoct.c')
-rw-r--r-- | lib/cvtoct.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/cvtoct.c b/lib/cvtoct.c index dafd8ff..0e03cad 100644 --- a/lib/cvtoct.c +++ b/lib/cvtoct.c @@ -27,23 +27,23 @@ ** ** NOTE: assumes buf is large enough to hold the resulting string */ -int cvtoct( char *buf, uint32_t value ) { +int cvtoct(char *buf, uint32_t value) +{ int i; int chars_stored = 0; char *bp = buf; uint32_t val; - val = ( value & 0xc0000000 ); + val = (value & 0xc0000000); val >>= 30; - for( i = 0; i < 11; i += 1 ){ - - if( i == 10 || val != 0 || chars_stored ) { + for (i = 0; i < 11; i += 1) { + if (i == 10 || val != 0 || chars_stored) { chars_stored = 1; val &= 0x7; *bp++ = val + '0'; } value <<= 3; - val = ( value & 0xe0000000 ); + val = (value & 0xe0000000); val >>= 29; } *bp = '\0'; |