Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
refactor: i++ -> ++i
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainTHD committed May 5, 2021
1 parent ede792b commit 4b00ca4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions kernel/icxxabi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extern "C" {
__atexit_funcs[__atexit_func_count].destructor_func = f;
__atexit_funcs[__atexit_func_count].obj_ptr = objptr;
__atexit_funcs[__atexit_func_count].dso_handle = dso;
__atexit_func_count++;
++__atexit_func_count;

return 0;
}
Expand All @@ -45,7 +45,7 @@ extern "C" {
(*__atexit_funcs[i].destructor_func)(__atexit_funcs[i].obj_ptr);
}

i--;
--i;
}

return;
Expand All @@ -65,7 +65,7 @@ extern "C" {
// FIXME: We should decrement `__atexit_func_count` but we would have to fix the previous bug
}

i--;
--i;
}
}
}
6 changes: 3 additions & 3 deletions libc/stdio/printText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace stdio {
u8 i = 0;
do {
printChar(' ');
i++;
++i;
} while (i <= (u8) (getCursorPosition() % VGA_WIDTH) % TAB_LENGTH);
}
break;
Expand Down Expand Up @@ -132,14 +132,14 @@ namespace stdio {

while (*charPtr != '\0') {
printChar(*charPtr, color);
charPtr++;
++charPtr;
}

if (end != nullptr) {
charPtr = (byte *) end;
while (*charPtr != '\0') {
printChar(*charPtr, color);
charPtr++;
++charPtr;
}
}
}
Expand Down

0 comments on commit 4b00ca4

Please sign in to comment.