1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:17:35 +00:00

Shell: Use size_t for SH_DEBUG vector iteration

We missed this when switching to size_t for vector sizing as this
code is not normally compiled.
This commit is contained in:
Shannon Booth 2020-03-22 10:14:12 +13:00 committed by Andreas Kling
parent ec6e55cfc6
commit d806dfe801

View file

@ -755,15 +755,15 @@ static int run_command(const String& cmd)
#ifdef SH_DEBUG #ifdef SH_DEBUG
for (auto& command : commands) { for (auto& command : commands) {
for (int i = 0; i < command.subcommands.size(); ++i) { for (size_t i = 0; i < command.subcommands.size(); ++i) {
for (int j = 0; j < i; ++j) for (size_t j = 0; j < i; ++j)
dbgprintf(" "); dbgprintf(" ");
for (auto& arg : command.subcommands[i].args) { for (auto& arg : command.subcommands[i].args) {
dbgprintf("<%s> ", arg.characters()); dbgprintf("<%s> ", arg.characters());
} }
dbgprintf("\n"); dbgprintf("\n");
for (auto& redirecton : command.subcommands[i].redirections) { for (auto& redirecton : command.subcommands[i].redirections) {
for (int j = 0; j < i; ++j) for (size_t j = 0; j < i; ++j)
dbgprintf(" "); dbgprintf(" ");
dbgprintf(" "); dbgprintf(" ");
switch (redirecton.type) { switch (redirecton.type) {