projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup error handling in open_channel
[ust.git]
/
libust
/
buffers.c
diff --git
a/libust/buffers.c
b/libust/buffers.c
index 4e8004c65e042d73e70bb175874fd279d10ab29c..4011b64310f6791d12318f7e41dc62cd9825a7f4 100644
(file)
--- a/
libust/buffers.c
+++ b/
libust/buffers.c
@@
-319,13
+319,10
@@
static int open_channel(struct ust_channel *chan, size_t subbuf_size,
return 0;
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:
error:
- do {} while(0);
- }
+ for(i--; i >= 0; i--)
+ close_buf(chan->buf[i]);
pthread_mutex_unlock(&ust_buffers_channels_mutex);
return -1;
pthread_mutex_unlock(&ust_buffers_channels_mutex);
return -1;
This page took
0.024055 seconds
and
4
git commands to generate.