From 802af08ea561258311a18a17c478ae0e10aff7f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 19 Jun 2017 11:29:37 -0400 Subject: [PATCH] Clean-up: coding style adjustments MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- plugins/ctf/fs-sink/write.c | 3 ++- plugins/ctf/fs-sink/writer.c | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/ctf/fs-sink/write.c b/plugins/ctf/fs-sink/write.c index feee1947..b3ad7462 100644 --- a/plugins/ctf/fs-sink/write.c +++ b/plugins/ctf/fs-sink/write.c @@ -195,13 +195,14 @@ bool valid_single_trace_path(const char *path) DIR *dir = opendir(path); int ret; - /* non-existent directory. */ + /* Non-existent directory. */ if (!dir) { ret = 0; goto end; } while ((d = readdir(dir)) != NULL) { + /* Ignore "." and ".." directories. */ if (++n > 2) { break; } diff --git a/plugins/ctf/fs-sink/writer.c b/plugins/ctf/fs-sink/writer.c index 36e35d92..8f383a51 100644 --- a/plugins/ctf/fs-sink/writer.c +++ b/plugins/ctf/fs-sink/writer.c @@ -297,13 +297,11 @@ enum bt_component_status apply_one_bool(const char *key, goto end; } status = bt_value_bool_get(value, &bool_val); - switch (status) { - case BT_VALUE_STATUS_OK: - break; - default: + if (status != BT_VALUE_STATUS_OK) { ret = BT_COMPONENT_STATUS_ERROR; goto end; } + *option = (bool) bool_val; if (found) { *found = true; -- 2.34.1