mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:56:00 +00:00
[TELNET] Add missing curly braces to while-statement
Fixes GCC 8 warning: base/applications/network/telnet/src/tmapldr.cpp:70:3: error: this 'while' clause does not guard... [-Werror=misleading-indentation] while (buf[len]) ^~~~~ base/applications/network/telnet/src/tmapldr.cpp:74:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while' if (len && (buf[len-1] == ' ')) { ^~
This commit is contained in:
parent
fdf221cb17
commit
454745e48c
1 changed files with 11 additions and 9 deletions
|
@ -67,18 +67,20 @@ static char * getline(istream& i, char* buf, int size){
|
||||||
if ((buf[0]==0)||(buf[0]==';')) continue;
|
if ((buf[0]==0)||(buf[0]==';')) continue;
|
||||||
|
|
||||||
len = 0; // look for comment like this one
|
len = 0; // look for comment like this one
|
||||||
while (buf[len])
|
while (buf[len])
|
||||||
if ((buf[len] == '/') && (buf[len+1] == '/')) buf[len] = 0;
|
{
|
||||||
else len++;
|
if ((buf[len] == '/') && (buf[len + 1] == '/')) buf[len] = 0;
|
||||||
|
else len++;
|
||||||
|
|
||||||
if (len && (buf[len-1] == ' ')) {
|
if (len && (buf[len - 1] == ' ')) {
|
||||||
len--;
|
len--;
|
||||||
buf[len]=0;
|
buf[len] = 0;
|
||||||
};
|
};
|
||||||
// in case for comment like this one (in line just a comment)
|
}
|
||||||
if (buf[0]==0) continue;
|
// in case for comment like this one (in line just a comment)
|
||||||
|
if (buf[0] == 0) continue;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
return (buf);
|
return (buf);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue