The standard says the post-increment can have effect at any point
between the previous and the next sequence point (or something similar),
so the behavior of "this->refresh_count = this->refresh_count ++" is
undefined.
Patch by Cristian Morales Vega
{
consumer_sdl this = parent->child;
pthread_mutex_lock( &this->refresh_mutex );
- this->refresh_count = this->refresh_count <= 0 ? 1 : this->refresh_count ++;
+ this->refresh_count = this->refresh_count <= 0 ? 1 : this->refresh_count + 1;
pthread_cond_broadcast( &this->refresh_cond );
pthread_mutex_unlock( &this->refresh_mutex );
}
{
consumer_sdl this = parent->child;
pthread_mutex_lock( &this->refresh_mutex );
- this->refresh_count = this->refresh_count <= 0 ? 1 : this->refresh_count ++;
+ this->refresh_count = this->refresh_count <= 0 ? 1 : this->refresh_count + 1;
pthread_cond_broadcast( &this->refresh_cond );
pthread_mutex_unlock( &this->refresh_mutex );
}