diff mbox

[1/6] multipathd/main.c: Fix indentation

Message ID 20180301192935.14643-2-bart.vanassche@wdc.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Bart Van Assche March 1, 2018, 7:29 p.m. UTC
This patch avoids that gcc reports the following:

main.c: In function 'uev_pathfail_check':
main.c:1022:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (!pp)
     ^~
main.c:1024:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  r = io_err_stat_handle_pathfail(pp);
  ^

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
---
 multipathd/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Martin Wilck March 5, 2018, 4:09 p.m. UTC | #1
On Thu, 2018-03-01 at 11:29 -0800, Bart Van Assche wrote:
> This patch avoids that gcc reports the following:
> 
> main.c: In function 'uev_pathfail_check':
> main.c:1022:5: warning: this 'if' clause does not guard... [-
> Wmisleading-indentation]
>      if (!pp)
>      ^~
> main.c:1024:2: note: ...this statement, but the latter is
> misleadingly indented as if it were guarded by the 'if'
>   r = io_err_stat_handle_pathfail(pp);
>   ^
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>

Reviewed-by: Martin Wilck <mwilck@suse.com>

> ---
>  multipathd/main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/multipathd/main.c b/multipathd/main.c
> index 27cf234623d0..ccbb0ad13d32 100644
> --- a/multipathd/main.c
> +++ b/multipathd/main.c
> @@ -1020,8 +1020,8 @@ uev_pathfail_check(struct uevent *uev, struct
> vectors *vecs)
>  	lock(&vecs->lock);
>  	pthread_testcancel();
>  	pp = find_path_by_devt(vecs->pathvec, devt);
> -    if (!pp)
> -        goto out_lock;
> +	if (!pp)
> +		goto out_lock;
>  	r = io_err_stat_handle_pathfail(pp);
>  	if (r)
>  		condlog(3, "io_err_stat: %s: cannot handle pathfail
> uevent",
diff mbox

Patch

diff --git a/multipathd/main.c b/multipathd/main.c
index 27cf234623d0..ccbb0ad13d32 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1020,8 +1020,8 @@  uev_pathfail_check(struct uevent *uev, struct vectors *vecs)
 	lock(&vecs->lock);
 	pthread_testcancel();
 	pp = find_path_by_devt(vecs->pathvec, devt);
-    if (!pp)
-        goto out_lock;
+	if (!pp)
+		goto out_lock;
 	r = io_err_stat_handle_pathfail(pp);
 	if (r)
 		condlog(3, "io_err_stat: %s: cannot handle pathfail uevent",