Remove excessive parentheses
There are many more.
This commit is contained in:
@@ -948,7 +948,7 @@ static bool motd_hushed( void )
|
|||||||
{
|
{
|
||||||
/* must be in home directory already */
|
/* must be in home directory already */
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
return (0 == lstat( ".hushlogin", &buf ));
|
return 0 == lstat( ".hushlogin", &buf );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_UTMPX_H
|
#ifdef HAVE_UTMPX_H
|
||||||
@@ -956,7 +956,7 @@ static bool device_exists( const char *ut_line )
|
|||||||
{
|
{
|
||||||
string device_name = string( "/dev/" ) + string( ut_line );
|
string device_name = string( "/dev/" ) + string( ut_line );
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
return (0 == lstat( device_name.c_str(), &buf ));
|
return 0 == lstat( device_name.c_str(), &buf );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -504,12 +504,12 @@ string Connection::recv_one( int sock_to_recv, bool nonblocking )
|
|||||||
|
|
||||||
struct cmsghdr *ecn_hdr = CMSG_FIRSTHDR( &header );
|
struct cmsghdr *ecn_hdr = CMSG_FIRSTHDR( &header );
|
||||||
if ( ecn_hdr
|
if ( ecn_hdr
|
||||||
&& (ecn_hdr->cmsg_level == IPPROTO_IP)
|
&& ecn_hdr->cmsg_level == IPPROTO_IP
|
||||||
&& ((ecn_hdr->cmsg_type == IP_TOS)
|
&& ( ecn_hdr->cmsg_type == IP_TOS
|
||||||
#ifdef IP_RECVTOS
|
#ifdef IP_RECVTOS
|
||||||
|| (ecn_hdr->cmsg_type == IP_RECVTOS)
|
|| ecn_hdr->cmsg_type == IP_RECVTOS
|
||||||
#endif
|
#endif
|
||||||
)) {
|
) ) {
|
||||||
/* got one */
|
/* got one */
|
||||||
uint8_t *ecn_octet_p = (uint8_t *)CMSG_DATA( ecn_hdr );
|
uint8_t *ecn_octet_p = (uint8_t *)CMSG_DATA( ecn_hdr );
|
||||||
assert( ecn_octet_p );
|
assert( ecn_octet_p );
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ bool FragmentAssembly::add_fragment( Fragment &frag )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* see if we're done */
|
/* see if we're done */
|
||||||
return ( fragments_arrived == fragments_total );
|
return fragments_arrived == fragments_total;
|
||||||
}
|
}
|
||||||
|
|
||||||
Instruction FragmentAssembly::get_assembly( void )
|
Instruction FragmentAssembly::get_assembly( void )
|
||||||
|
|||||||
@@ -79,15 +79,15 @@ Transition State::input( wchar_t ch ) const
|
|||||||
|
|
||||||
static bool C0_prime( wchar_t ch )
|
static bool C0_prime( wchar_t ch )
|
||||||
{
|
{
|
||||||
return ( (ch <= 0x17)
|
return (ch <= 0x17)
|
||||||
|| (ch == 0x19)
|
|| (ch == 0x19)
|
||||||
|| ( (0x1C <= ch) && (ch <= 0x1F) ) );
|
|| ( (0x1C <= ch) && (ch <= 0x1F) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool GLGR ( wchar_t ch )
|
static bool GLGR ( wchar_t ch )
|
||||||
{
|
{
|
||||||
return ( ( (0x20 <= ch) && (ch <= 0x7F) ) /* GL area */
|
return ( (0x20 <= ch) && (ch <= 0x7F) ) /* GL area */
|
||||||
|| ( (0xA0 <= ch) && (ch <= 0xFF) ) ); /* GR area */
|
|| ( (0xA0 <= ch) && (ch <= 0xFF) ); /* GR area */
|
||||||
}
|
}
|
||||||
|
|
||||||
Transition Ground::input_state_rule( wchar_t ch ) const
|
Transition Ground::input_state_rule( wchar_t ch ) const
|
||||||
|
|||||||
@@ -179,5 +179,5 @@ void Emulator::resize( size_t s_width, size_t s_height )
|
|||||||
bool Emulator::operator==( Emulator const &x ) const
|
bool Emulator::operator==( Emulator const &x ) const
|
||||||
{
|
{
|
||||||
/* dispatcher and user are irrelevant for us */
|
/* dispatcher and user are irrelevant for us */
|
||||||
return ( fb == x.fb );
|
return fb == x.fb;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,6 +248,10 @@ void Dispatcher::OSC_start( const Parser::OSC_Start *act __attribute((unused)) )
|
|||||||
|
|
||||||
bool Dispatcher::operator==( const Dispatcher &x ) const
|
bool Dispatcher::operator==( const Dispatcher &x ) const
|
||||||
{
|
{
|
||||||
return ( params == x.params ) && ( parsed_params == x.parsed_params ) && ( parsed == x.parsed )
|
return ( params == x.params )
|
||||||
&& ( dispatch_chars == x.dispatch_chars ) && ( OSC_string == x.OSC_string ) && ( terminal_to_host == x.terminal_to_host );
|
&& ( parsed_params == x.parsed_params )
|
||||||
|
&& ( parsed == x.parsed )
|
||||||
|
&& ( dispatch_chars == x.dispatch_chars )
|
||||||
|
&& ( OSC_string == x.OSC_string )
|
||||||
|
&& ( terminal_to_host == x.terminal_to_host );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,7 +227,8 @@ std::string Display::new_frame( bool initialized, const Framebuffer &last, const
|
|||||||
/* Common case: if we're already on the bottom line and we're scrolling the whole
|
/* Common case: if we're already on the bottom line and we're scrolling the whole
|
||||||
* screen, just do a CR and LFs.
|
* screen, just do a CR and LFs.
|
||||||
*/
|
*/
|
||||||
if ( (scroll_height + lines_scrolled == f.ds.get_height() ) && frame.cursor_y + 1 == f.ds.get_height() ) {
|
if ( scroll_height + lines_scrolled == f.ds.get_height()
|
||||||
|
&& frame.cursor_y + 1 == f.ds.get_height() ) {
|
||||||
frame.append( '\r' );
|
frame.append( '\r' );
|
||||||
frame.append( lines_scrolled, '\n' );
|
frame.append( lines_scrolled, '\n' );
|
||||||
frame.cursor_x = 0;
|
frame.cursor_x = 0;
|
||||||
|
|||||||
@@ -584,8 +584,8 @@ void Dispatcher::OSC_dispatch( const Parser::OSC_End *act __attribute((unused)),
|
|||||||
cmd_num = OSC_string[ 0 ] - L'0';
|
cmd_num = OSC_string[ 0 ] - L'0';
|
||||||
offset = 2;
|
offset = 2;
|
||||||
}
|
}
|
||||||
bool set_icon = (cmd_num == 0 || cmd_num == 1);
|
bool set_icon = cmd_num == 0 || cmd_num == 1;
|
||||||
bool set_title = (cmd_num == 0 || cmd_num == 2);
|
bool set_title = cmd_num == 0 || cmd_num == 2;
|
||||||
if ( set_icon || set_title ) {
|
if ( set_icon || set_title ) {
|
||||||
fb->set_title_initialized();
|
fb->set_title_initialized();
|
||||||
int title_length = min(OSC_string.size(), (size_t)256);
|
int title_length = min(OSC_string.size(), (size_t)256);
|
||||||
|
|||||||
Reference in New Issue
Block a user