On 09/03/2010 02:52 PM, Mathieu Desnoyers wrote:
* David Goulet ([email protected]) wrote:
Signed-off-by: David Goulet<[email protected]>
---
libust/tracectl.c | 63 ++++++++++++++++++++++++++++++++++++++++++--------
libustcmd/ustcmd.c | 41 +++++++++++++++++++++++++++-----
libustcomm/ustcomm.c | 24 ++++++++++++++++---
libustd/libustd.c | 37 ++++++++++++++++++++++++----
tests/hello/hello.c | 6 +++-
ustd/ustd.c | 12 ++++++++-
6 files changed, 152 insertions(+), 31 deletions(-)
diff --git a/libust/tracectl.c b/libust/tracectl.c
index ac551d5..1bb841f 100644
--- a/libust/tracectl.c
+++ b/libust/tracectl.c
@@ -156,7 +156,11 @@ static void inform_consumer_daemon(const char *trace_name)
/* iterate on all cpus */
for(j=0; j<trace->channels[i].n_cpus; j++) {
char *buf;
- asprintf(&buf, "%s_%d",
trace->channels[i].channel_name, j);
+ if(asprintf(&buf, "%s_%d",
trace->channels[i].channel_name, j) == -1) {
please standardize on the kernel coding style:
if ()
for ()
switch ()
but function() and macroname().
Also, please use a if (asprintf(...)< 0) test. I know the manpage
states that -1 is explicitely returned, but it's very typical for all
negative values to be more explicit error value variants. So let's make
these tests as similar as possible.
No. It's typical in the linux kernel, but not in unix userspace and not
in ust internal apis.
pmf
_______________________________________________
ltt-dev mailing list
[email protected]
http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev