Re: Simplify a function

2013-07-29 Thread Kristian Høgsberg
On Thu, Jul 25, 2013 at 01:51:53AM +0300, Jiergir Ogoerg wrote: > Hi, > I think in wayland-client.c the function > wl_display_dispatch_queue_pending(...) > could be simplified > from this: > pthread_mutex_lock(&display->mutex); > if (dispatch_queue(display, queue) == -1) > goto err_

Re: Simplify a function

2013-07-24 Thread Dennis Lan (dlan)
On Thu, Jul 25, 2013 at 6:51 AM, Jiergir Ogoerg wrote: > Hi, > I think in wayland-client.c the function > wl_display_dispatch_queue_pending(...) > could be simplified > from this: > pthread_mutex_lock(&display->mutex); > if (dispatch_queue(display, queue) == -1) > goto err_unlock;

Simplify a function

2013-07-24 Thread Jiergir Ogoerg
Hi, I think in wayland-client.c the function wl_display_dispatch_queue_pending(...) could be simplified from this: pthread_mutex_lock(&display->mutex); if (dispatch_queue(display, queue) == -1) goto err_unlock; pthread_mutex_unlock(&display->mutex); return 0; err_unlock: