From 22acd9c7dda2c48c4a161aa39b5a598fef4f6310 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 30 Sep 2009 23:18:04 -0400 Subject: [PATCH] Fix liblttctl closedir MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- liblttctl/liblttctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/liblttctl/liblttctl.c b/liblttctl/liblttctl.c index 6ee37a4..6d49aeb 100644 --- a/liblttctl/liblttctl.c +++ b/liblttctl/liblttctl.c @@ -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) { -- 2.34.1