Fix liblttctl closedir
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 1 Oct 2009 03:18:04 +0000 (23:18 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 1 Oct 2009 03:18:04 +0000 (23:18 -0400)
Here's my patch to liblttctl.c so it compiles and runs using uClibc. I'm using
Linux 2.6.30.

 Sincerely,
 Scott Esters, AF6RT
 scott@af6rt.com

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
liblttctl/liblttctl.c

index 6ee37a479797d7f5f70d65446035c9c69588e354..6d49aeb37b440dc631376975ef1cac3acb2120d6 100644 (file)
@@ -162,6 +162,7 @@ static int lttctl_check_trace(const char *name, int expect)
        dir = opendir(tracedirname);
        if (dir) {
                exist = 1;
+               closedir(dir);
        } else {
                if (errno != ENOENT) {
                        fprintf(stderr, "%s: %s\n", __func__, strerror(errno));
@@ -170,8 +171,6 @@ static int lttctl_check_trace(const char *name, int expect)
                exist = 0;
        }
 
-       closedir(dir);
-
        if (!expect != !exist) {
                if (exist)
                {
This page took 0.027142 seconds and 4 git commands to generate.