From: Jérémie Galarneau Date: Mon, 19 Jun 2017 15:29:37 +0000 (-0400) Subject: Clean-up: coding style adjustments X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=802af08ea561258311a18a17c478ae0e10aff7f3;p=deliverable%2Fbabeltrace.git Clean-up: coding style adjustments Signed-off-by: Jérémie Galarneau --- diff --git a/plugins/ctf/fs-sink/write.c b/plugins/ctf/fs-sink/write.c index feee19472..b3ad7462e 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 36e35d928..8f383a519 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;