From d8ca92a6794669235f044d62353d42e7573feb35 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 26 Jan 2017 17:31:50 +0100 Subject: sethdlc: Fix missleading indentation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sethdlc.c: In function ‘do_set_params’: sethdlc.c:333:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (set & 1) ^~ sethdlc.c:335:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ if (ret < 0) { ^~ Signed-off-by: Ralf Baechle --- hdlcutil/sethdlc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'hdlcutil/sethdlc.c') diff --git a/hdlcutil/sethdlc.c b/hdlcutil/sethdlc.c index 8cba1ac..e88d0b5 100644 --- a/hdlcutil/sethdlc.c +++ b/hdlcutil/sethdlc.c @@ -332,17 +332,16 @@ static void do_set_params(int argc, char **argv) if (set & 1) ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_SETMODE, &newm); + if (ret < 0) { + perror("ioctl (HDLCDRVCTL_SETMODE)"); + ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_MODELIST, &mlist); if (ret < 0) { - perror("ioctl (HDLCDRVCTL_SETMODE)"); - ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_MODELIST, &mlist); - if (ret < 0) { - perror("ioctl (HDLCDRVCTL_MODELIST)"); - exit(1); - } - printf("driver supported modes: %s\n", - mlist.data.modename); + perror("ioctl (HDLCDRVCTL_MODELIST)"); exit(1); } + printf("driver supported modes: %s\n", mlist.data.modename); + exit(1); + } if (set & 2) { ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_SETMODEMPAR, &newp); if (ret < 0) { -- cgit v1.2.3