free( tree->right );
}
if( tree->op == ML_OP_NONE && ml_AttributeIsString( tree->criteria )
- && freestrings == true)
+ && freestrings)
{
free( tree->value.str );
if( tree->criteria == ML_PEOPLE )
i_tag = AOT_ANSW;
i_size = 1 + strlen( p_object->u.answ.psz_answ );
p_data = xmalloc( i_size );
- p_data[0] = (p_object->u.answ.b_ok == true) ? 0x1 : 0x0;
+ p_data[0] = p_object->u.answ.b_ok ? 0x1 : 0x0;
strncpy( (char *)&p_data[1], p_object->u.answ.psz_answ, i_size - 1 );
break;
p_mmi->u.enq.psz_text[l] = '\0';
msg_Dbg( p_cam->obj, "MMI enq: %s%s", p_mmi->u.enq.psz_text,
- p_mmi->u.enq.b_blind == true ? " (blind)" : "" );
+ p_mmi->u.enq.b_blind ? " (blind)" : "" );
p_cam->pb_slot_mmi_expected[i_slot] = false;
p_cam->pb_slot_mmi_undisplayed[i_slot] = true;
}
*****************************************************************************/
static mmi_t *en50221_GetMMIObject( cam_t * p_cam, unsigned i_slot )
{
- if( p_cam->pb_slot_mmi_expected[i_slot] == true )
+ if( p_cam->pb_slot_mmi_expected[i_slot] )
return NULL; /* should not happen */
for( unsigned i = 1; i <= MAX_SESSIONS; i++ )
* the user input to avoid confusing the CAM. */
for ( unsigned i_slot = 0; i_slot < p_cam->i_nb_slots; i_slot++ )
{
- if ( p_cam->pb_slot_mmi_undisplayed[i_slot] == true )
+ if ( p_cam->pb_slot_mmi_undisplayed[i_slot] )
{
psz_request = NULL;
msg_Dbg( p_cam->obj,
/* Check that we have all necessary MMI information. */
for( unsigned i_slot = 0; i_slot < p_cam->i_nb_slots; i_slot++ )
{
- if ( p_cam->pb_slot_mmi_expected[i_slot] == true )
+ if ( p_cam->pb_slot_mmi_expected[i_slot] )
return NULL;
}
{
/* Unlock the thread if it is stuck in HttpCallback */
vlc_mutex_lock( &p_sys->httpd_mutex );
- if ( p_sys->b_request_frontend_info == true )
+ if ( p_sys->b_request_frontend_info )
{
p_sys->b_request_frontend_info = false;
p_sys->psz_frontend_info = strdup("");
}
- if ( p_sys->b_request_mmi_info == true )
+ if ( p_sys->b_request_mmi_info )
{
p_sys->b_request_mmi_info = false;
p_sys->psz_mmi_info = strdup("");
setsockopt (p_sys->fd, SOL_SOCKET, SO_KEEPALIVE, &(int){ 1 }, sizeof (int));
/* Initialize TLS/SSL session */
- if( p_sys->b_ssl == true )
+ if( p_sys->b_ssl )
{
/* CONNECT to establish TLS tunnel through HTTP proxy */
if( p_sys->b_proxy )
b_tmp = var_GetBool( p_enc, ENC_CFG_PREFIX ENC_CODINGMODE );
- if( b_tmp == true )
+ if( b_tmp )
p_sys->b_auto_field_coding = true;
else
p_sys->b_auto_field_coding = false;
/* Add a node with name and info */
set = mvar_New( name, "set" );
- if( b_name == true )
+ if( b_name )
{
mvar_AppendNewVar( set, "name", el->psz_name );
}
if( strlen( newval.psz_string ) > 0 )
{
- if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == true ) ) ||
+ if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool ) ) ||
( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
{
b_update = false;
if( strlen( newval.psz_string ) > 0 )
{
- if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == true ) ) ||
+ if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool ) ) ||
( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
{
b_update = false;
if( strlen( newval.psz_string ) > 0 )
{
- if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == true ) ) ||
+ if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool ) ) ||
( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
{
b_update = false;
( p_item->i_type == CONFIG_CATEGORY ||
p_item->i_type == CONFIG_SUBCATEGORY ) )
break;
- if( p_item->b_internal == true ) continue;
+ if( p_item->b_internal ) continue;
if( p_item->i_type == CONFIG_SECTION )
{
void BoolConfigControl::finish()
{
- checkbox->setChecked( p_item->value.i == true );
+ checkbox->setChecked( p_item->value.i );
if( p_item->psz_longtext )
checkbox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
void ClickLineEdit::paintEvent( QPaintEvent *pe )
{
QLineEdit::paintEvent( pe );
- if ( mDrawClickMsg == true && !hasFocus() ) {
+ if ( mDrawClickMsg && !hasFocus() ) {
QPainter p( this );
QPen tmp = p.pen();
p.setPen( palette().color( QPalette::Disabled, QPalette::Text ) );
void ClickLineEdit::focusInEvent( QFocusEvent *ev )
{
- if ( mDrawClickMsg == true ) {
+ if ( mDrawClickMsg ) {
mDrawClickMsg = false;
repaint();
}
else
{
ml_LockMedia( p_media );
- if( p_media->b_sparse == true && select == ML_MEDIA )
+ if( p_media->b_sparse && select == ML_MEDIA )
reload = true;
/* Utilise ML_MEDIA_EXTRA load? TODO */
ml_UnlockMedia( p_media );
psz_on2 == NULL ? "" : " AND " );
}
}
- if( join == true )
+ if( join )
{
if( psz_peoplerole && *psz_peoplerole )
{
tls_session_t *client = (tls_session_t *)obj;
tls_client_sys_t *p_sys = (tls_client_sys_t *)(client->p_sys);
- if (p_sys->session.b_handshaked == true)
+ if (p_sys->session.b_handshaked)
gnutls_bye (p_sys->session.session, GNUTLS_SHUT_WR);
gnutls_deinit (p_sys->session.session);
/* credentials must be free'd *after* gnutls_deinit() */
tls_session_sys_t *p_sys = p_session->p_sys;
(void)p_server;
- if( p_sys->b_handshaked == true )
+ if( p_sys->b_handshaked )
gnutls_bye( p_sys->session, GNUTLS_SHUT_WR );
gnutls_deinit( p_sys->session );
psz_encoded[4] = j;
for( j = 0 ; psz_notifications[j] != NULL ; j++)
{
- if(pb_defaults[j] == true)
+ if(pb_defaults[j])
{
psz_encoded[i++] = (uint8_t)j;
i_defaults++;
{
filter_sys_t *p_sys = p_filter->p_sys;
- if(p_sys->b_enabled == true)
+ if(p_sys->b_enabled)
{
msg_Dbg( p_filter, "shut down atmo!");
/*
/*
if debugging enabled save every 128th image to disk
*/
- if((p_sys->b_saveframes == true) && (p_sys->sz_framepath[0] != 0 ))
+ if(p_sys->b_saveframes && p_sys->sz_framepath[0] != 0 )
{
if((p_sys->ui_frame_counter & 127) == 0)
vlc_mutex_lock( &p_sys->filter_lock );
- if((p_sys->b_enabled == true) &&
- (p_sys->pf_extract_mini_image != NULL) &&
- (p_sys->b_pause_live == false))
+ if(p_sys->b_enabled && p_sys->pf_extract_mini_image &&
+ !p_sys->b_pause_live)
{
p_sys->i_crop_x_offset = p_filter->fmt_in.video.i_x_offset;
p_sys->i_crop_y_offset = p_filter->fmt_in.video.i_y_offset;
filter_t *p_filter = (filter_t *)p_data;
filter_sys_t *p_sys = (filter_sys_t *)p_filter->p_sys;
- if((p_sys->b_usepausecolor == true) && (p_sys->b_enabled == true))
+ if(p_sys->b_usepausecolor && p_sys->b_enabled)
{
msg_Dbg(p_filter, "state change from: %"PRId64" to %"PRId64, oldval.i_int,
newval.i_int);
Note that now p_dst[i] != NULL for 0 <= i < i_double_rate_alloc_end. */
}
- assert( p_sys->b_double_rate == true || p_dst[1] == NULL );
+ assert( p_sys->b_double_rate || p_dst[1] == NULL );
assert( i_nb_fields > 2 || p_dst[2] == NULL );
/* Render */
p_cmddesc->p_command->pf_parser( p_cmd, p_end,
&p_cmddesc->params );
- if( ( p_cmddesc->p_command->b_atomic == true ) &&
- ( p_sys->b_atomic == true ) )
+ if( p_cmddesc->p_command->b_atomic && p_sys->b_atomic )
QueueEnqueue( &p_sys->atomic, p_cmddesc );
else
QueueEnqueue( &p_sys->pending, p_cmddesc );
if( p_ovl == NULL )
return VLC_EGENERIC;
- p_results->b_visible = ( p_ovl->b_active == true ) ? 1 : 0;
+ p_results->b_visible = p_ovl->b_active ? 1 : 0;
return VLC_SUCCESS;
}
for( ; pp_cur < p_list->pp_tail; ++pp_cur )
{
if( ( *pp_cur != NULL ) &&
- ( (*pp_cur)->b_active == true )&&
+ ( (*pp_cur)->b_active )&&
( (*pp_cur)->format.i_chroma != VLC_FOURCC( '\0','\0','\0','\0') ) )
{
return *pp_cur;
msg->scme.nColours = htons(msg->scme.nColours);
msg->scme.firstColour = htons(msg->scme.firstColour);
int i_datasize;
- if ( p_sys->b_alpha_from_vnc == true )
+ if ( p_sys->b_alpha_from_vnc )
{
i_datasize = 2 * msg->scme.nColours * 4;
}
for (int i = 0; i < msg->scme.nColours; i++)
{
i_color_index = i+msg->scme.firstColour;
- if ( p_sys->b_alpha_from_vnc == true )
+ if ( p_sys->b_alpha_from_vnc )
{
i_alpha = p_sys->read_buffer[i_offset];
i_offset += 2;
{
mtime_t i_real_date = vlm->schedule[i]->i_date;
- if( vlm->schedule[i]->b_enabled == true )
+ if( vlm->schedule[i]->b_enabled )
{
if( vlm->schedule[i]->i_date == 0 ) // now !
{
else
i_length += strlen( "new * broadcast " ) + strlen(p_cfg->psz_name);
- if( p_cfg->b_enabled == true )
+ if( p_cfg->b_enabled )
i_length += strlen( "enabled" );
else
i_length += strlen( "disabled" );
- if( !p_cfg->b_vod && p_cfg->broadcast.b_loop == true )
+ if( !p_cfg->b_vod && p_cfg->broadcast.b_loop )
i_length += strlen( " loop\n" );
else
i_length += strlen( "\n" );
i_length += strlen( "new schedule " ) + strlen( schedule->psz_name );
- if( schedule->b_enabled == true )
+ if( schedule->b_enabled )
{
i_length += strlen( "date //-:: enabled\n" ) + 14;
}
localtime_r( &i_time, &date);
p += sprintf( p, "new %s schedule ", schedule->psz_name);
- if( schedule->b_enabled == true )
+ if( schedule->b_enabled )
{
p += sprintf( p, "date %d/%d/%d-%d:%d:%d enabled\n",
date.tm_year + 1900, date.tm_mon + 1, date.tm_mday,
#if defined(MEDIA_LIBRARY)
/* Get the ML */
- if( var_GetBool( p_libvlc, "load-media-library-on-startup" ) == true )
+ if( var_GetBool( p_libvlc, "load-media-library-on-startup" ) )
{
priv->p_ml = ml_Create( VLC_OBJECT( p_libvlc ), NULL );
if( !priv->p_ml )
p_counter->i_samples, p_sample );
p_sample->date = 0; p_sample->value.i_int = 0;
}
- if( p_counter->pp_samples[0]->value.b_bool == true )
+ if( p_counter->pp_samples[0]->value.b_bool )
{
msg_Warn( p_obj, "timer '%s' was already started !", psz_name );
goto out;
}
i_total = p_counter->pp_samples[1]->value.i_int;
total = p_counter->pp_samples[1]->date;
- if( p_counter->pp_samples[0]->value.b_bool == true )
+ if( p_counter->pp_samples[0]->value.b_bool )
{
last = mdate() - p_counter->pp_samples[0]->date;
i_total += 1;