mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 02:10:07 +00:00
[TELNET] Add missing curly braces to for-statement
Fixes GCC 8 warning: base/applications/network/telnet/src/tnmain.cpp:171:8: error: this 'for' clause does not guard... [-Werror=misleading-indentation] for (j = cursor; j >= 0; j--) ^~~ base/applications/network/telnet/src/tnmain.cpp:174:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for' for (k = --j; k >= 0; k--) ^~~
This commit is contained in:
parent
454745e48c
commit
194180b1be
|
@ -168,14 +168,18 @@ struct cmdHistory * cfgets (char *buf, unsigned int length, struct cmdHistory *c
|
||||||
if(InputRecord.Event.KeyEvent.dwControlKeyState &
|
if(InputRecord.Event.KeyEvent.dwControlKeyState &
|
||||||
(LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) {
|
(LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) {
|
||||||
int j, k;
|
int j, k;
|
||||||
for (j = cursor; j >= 0; j--)
|
for (j = cursor; j >= 0; j--)
|
||||||
if (buf[j-1] != ' ')
|
{
|
||||||
break;
|
if (buf[j - 1] != ' ')
|
||||||
for (k = --j; k >= 0; k--)
|
break;
|
||||||
if (buf[k] == ' ' || k == 0) {
|
for (k = --j; k >= 0; k--)
|
||||||
cursor = !k ? k : ++k;
|
{
|
||||||
break;
|
if (buf[k] == ' ' || k == 0) {
|
||||||
}
|
cursor = !k ? k : ++k;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
cursor--;
|
cursor--;
|
||||||
MustRefresh = 1;
|
MustRefresh = 1;
|
||||||
|
|
Loading…
Reference in a new issue