Cleanup error handling in open_channel
[ust.git] / libust / buffers.c
index 4e8004c65e042d73e70bb175874fd279d10ab29c..4011b64310f6791d12318f7e41dc62cd9825a7f4 100644 (file)
@@ -319,13 +319,10 @@ static int open_channel(struct ust_channel *chan, size_t subbuf_size,
 
        return 0;
 
-       /* Jump directly inside the loop to close the buffers that were already
-        * opened. */
-       for(; i>=0; i--) {
-               close_buf(chan->buf[i]);
+       /* Error handling */
 error:
-               do {} while(0);
-       }
+       for(i--; i >= 0; i--)
+               close_buf(chan->buf[i]);
 
        pthread_mutex_unlock(&ust_buffers_channels_mutex);
        return -1;
This page took 0.035717 seconds and 4 git commands to generate.