projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change malloc to zmalloc for libust
[ust.git]
/
libust
/
tracectl.c
diff --git
a/libust/tracectl.c
b/libust/tracectl.c
index e339218ebd216108fb1f4c7bf6b9cc2e690ec442..e64b26f7cf85dc6ad2718d508f0e95d2cd226c8d 100644
(file)
--- a/
libust/tracectl.c
+++ b/
libust/tracectl.c
@@
-282,12
+282,14
@@
static int do_cmd_get_shmid(const char *recvbuf, struct ustcomm_source *src)
channel_and_cpu = nth_token(recvbuf, 1);
if(channel_and_cpu == NULL) {
ERR("cannot parse channel");
channel_and_cpu = nth_token(recvbuf, 1);
if(channel_and_cpu == NULL) {
ERR("cannot parse channel");
+ retval = -1;
goto end;
}
seperate_channel_cpu(channel_and_cpu, &ch_name, &ch_cpu);
if(ch_cpu == -1) {
ERR("problem parsing channel name");
goto end;
}
seperate_channel_cpu(channel_and_cpu, &ch_name, &ch_cpu);
if(ch_cpu == -1) {
ERR("problem parsing channel name");
+ retval = -1;
goto free_short_chan_name;
}
goto free_short_chan_name;
}
@@
-360,12
+362,14
@@
static int do_cmd_get_n_subbufs(const char *recvbuf, struct ustcomm_source *src)
channel_and_cpu = nth_token(recvbuf, 1);
if(channel_and_cpu == NULL) {
ERR("cannot parse channel");
channel_and_cpu = nth_token(recvbuf, 1);
if(channel_and_cpu == NULL) {
ERR("cannot parse channel");
+ retval = -1;
goto end;
}
seperate_channel_cpu(channel_and_cpu, &ch_name, &ch_cpu);
if(ch_cpu == -1) {
ERR("problem parsing channel name");
goto end;
}
seperate_channel_cpu(channel_and_cpu, &ch_name, &ch_cpu);
if(ch_cpu == -1) {
ERR("problem parsing channel name");
+ retval = -1;
goto free_short_chan_name;
}
goto free_short_chan_name;
}
@@
-434,12
+438,14
@@
static int do_cmd_get_subbuf_size(const char *recvbuf, struct ustcomm_source *sr
channel_and_cpu = nth_token(recvbuf, 1);
if(channel_and_cpu == NULL) {
ERR("cannot parse channel");
channel_and_cpu = nth_token(recvbuf, 1);
if(channel_and_cpu == NULL) {
ERR("cannot parse channel");
+ retval = -1;
goto end;
}
seperate_channel_cpu(channel_and_cpu, &ch_name, &ch_cpu);
if(ch_cpu == -1) {
ERR("problem parsing channel name");
goto end;
}
seperate_channel_cpu(channel_and_cpu, &ch_name, &ch_cpu);
if(ch_cpu == -1) {
ERR("problem parsing channel name");
+ retval = -1;
goto free_short_chan_name;
}
goto free_short_chan_name;
}
@@
-522,6
+528,7
@@
static int do_cmd_set_subbuf_size(const char *recvbuf, struct ustcomm_source *sr
if(ch_name == NULL) {
ERR("cannot parse channel");
if(ch_name == NULL) {
ERR("cannot parse channel");
+ retval = -1;
goto end;
}
goto end;
}
@@
-577,10
+584,12
@@
static int do_cmd_set_subbuf_num(const char *recvbuf, struct ustcomm_source *src
if(ch_name == NULL) {
ERR("cannot parse channel");
if(ch_name == NULL) {
ERR("cannot parse channel");
+ retval = -1;
goto end;
}
if (num < 2) {
ERR("subbuffer count should be greater than 2");
goto end;
}
if (num < 2) {
ERR("subbuffer count should be greater than 2");
+ retval = -1;
goto end;
}
goto end;
}
@@
-629,12
+638,14
@@
static int do_cmd_get_subbuffer(const char *recvbuf, struct ustcomm_source *src)
channel_and_cpu = nth_token(recvbuf, 1);
if(channel_and_cpu == NULL) {
ERR("cannot parse channel");
channel_and_cpu = nth_token(recvbuf, 1);
if(channel_and_cpu == NULL) {
ERR("cannot parse channel");
+ retval = -1;
goto end;
}
seperate_channel_cpu(channel_and_cpu, &ch_name, &ch_cpu);
if(ch_cpu == -1) {
ERR("problem parsing channel name");
goto end;
}
seperate_channel_cpu(channel_and_cpu, &ch_name, &ch_cpu);
if(ch_cpu == -1) {
ERR("problem parsing channel name");
+ retval = -1;
goto free_short_chan_name;
}
goto free_short_chan_name;
}
@@
-664,9
+675,9
@@
static int do_cmd_get_subbuffer(const char *recvbuf, struct ustcomm_source *src)
found = 1;
found = 1;
- bc = (struct blocked_consumer *) malloc(sizeof(struct blocked_consumer));
+ bc = (struct blocked_consumer *)
z
malloc(sizeof(struct blocked_consumer));
if(bc == NULL) {
if(bc == NULL) {
- ERR("malloc returned NULL");
+ ERR("
z
malloc returned NULL");
goto unlock_traces;
}
bc->fd_consumer = src->fd;
goto unlock_traces;
}
bc->fd_consumer = src->fd;
This page took
0.023662 seconds
and
4
git commands to generate.