Skip to content
Snippets Groups Projects
Commit aa57ea5b authored by Alexandre Abadie's avatar Alexandre Abadie
Browse files

core: instead of cpp-style, use C-style comments

parent 3d4d9c79
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@
unsigned bitarithm_msb(unsigned v)
{
register unsigned r; // result of log2(v) will go here
register unsigned r; /* result of log2(v) will go here */
#if ARCH_32_BIT
register unsigned shift;
......@@ -37,7 +37,7 @@ unsigned bitarithm_msb(unsigned v)
r |= (v >> 1);
#else
r = 0;
while (v >>= 1) { // unroll for more speed...
while (v >>= 1) { /* unroll for more speed... */
r++;
}
......@@ -48,10 +48,10 @@ unsigned bitarithm_msb(unsigned v)
unsigned bitarithm_bits_set(unsigned v)
{
unsigned c; // c accumulates the total bits set in v
unsigned c; /* c accumulates the total bits set in v */
for (c = 0; v; c++) {
v &= v - 1; // clear the least significant bit set
v &= v - 1; /* clear the least significant bit set */
}
return c;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment