Clean-up: coding style adjustments
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Jun 2017 15:29:37 +0000 (11:29 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Jun 2017 15:29:37 +0000 (11:29 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/ctf/fs-sink/write.c
plugins/ctf/fs-sink/writer.c

index feee19472fe086fc7c3a90258e734b50f0ad0053..b3ad7462eb4f43caeb3a46471b25238833f4304a 100644 (file)
@@ -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;
                }
index 36e35d928819ed5ec2b131c04670f421184d6e54..8f383a519de7cef9e5e4407ce3b8390d7c1d3840 100644 (file)
@@ -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;
This page took 0.025655 seconds and 4 git commands to generate.