Whamcloud - gitweb
LU-8587 utils: Fix incorrect indenting in llapi_hsm_log_ct_progress 70/24570/3
authorOleg Drokin <oleg.drokin@intel.com>
Sun, 1 Jan 2017 18:45:06 +0000 (13:45 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 24 Jan 2017 05:24:22 +0000 (05:24 +0000)
gcc6 highlights this case of incorrect indenting:
        if (progress_type == CT_RUNNING)
                rc = llapi_json_add_item(&json_items, "current_bytes",
                                         LLAPI_JSON_BIGNUM, &current);
                if (rc < 0)
                        goto err;

Just add the braces around, though logic-wise it's all fine.

Change-Id: I770857fe2f9ce29817558247ce0987842b8d06b4
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/24570
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
lustre/utils/liblustreapi_hsm.c

index 6880ac5..345ab1b 100644 (file)
@@ -429,11 +429,12 @@ static int llapi_hsm_log_ct_progress(struct hsm_copyaction_private **phcp,
                        goto err;
        }
 
-       if (progress_type == CT_RUNNING)
+       if (progress_type == CT_RUNNING) {
                rc = llapi_json_add_item(&json_items, "current_bytes",
                                         LLAPI_JSON_BIGNUM, &current);
                if (rc < 0)
                        goto err;
+       }
 
 cancel:
        rc = llapi_json_add_item(&json_items, "event_type", LLAPI_JSON_STRING,