summaryrefslogtreecommitdiffstats
path: root/hdlcutil
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-01-26 17:31:50 +0100
committerRalf Baechle <ralf@linux-mips.org>2017-01-26 21:58:47 +0100
commitd8ca92a6794669235f044d62353d42e7573feb35 (patch)
tree7b59b46f2ed6af8c2b334f18befdc185c74f1157 /hdlcutil
parent431e889186131c40e737a61d87a9d1426b22aee2 (diff)
sethdlc: Fix missleading indentation.
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 <ralf@linux-mips.org>
Diffstat (limited to 'hdlcutil')
-rw-r--r--hdlcutil/sethdlc.c15
1 files changed, 7 insertions, 8 deletions
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) {