summaryrefslogtreecommitdiffstats
path: root/hdlcutil/smmixer.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-07-28 14:10:07 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-07-31 04:29:44 +0200
commitdaba307035faf4cc01f1ccb883b21281d91234cc (patch)
treeedbd5df9285303f281524fac8064866057ce35ce /hdlcutil/smmixer.c
parent71b0582584ac5de97141ea207ddf17f7c938b2df (diff)
treewide: Kill assignments in if conditions.
Somewhat hard to read and the code base already has many overlong lines. Found with below spatch file and some manual editing in ax25/access.c to restore a comment lost by spatch. @parens@ expression E, F, G; binary operator X; statement S; @@ - if ((E = F) X G) + E = F; + if (E X G) S Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'hdlcutil/smmixer.c')
-rw-r--r--hdlcutil/smmixer.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/hdlcutil/smmixer.c b/hdlcutil/smmixer.c
index 69c56f6..a8ce152 100644
--- a/hdlcutil/smmixer.c
+++ b/hdlcutil/smmixer.c
@@ -72,7 +72,8 @@ static unsigned char get_mixer_reg(unsigned char addr)
struct sm_mixer_data mixdat;
mixdat.reg = addr;
- if ((i = do_mix_ioctl(SMCTL_GETMIXER, &mixdat)) < 0) {
+ i = do_mix_ioctl(SMCTL_GETMIXER, &mixdat);
+ if (i < 0) {
perror("do_mix_ioctl: SMCTL_GETMIXER");
exit(1);
}
@@ -389,21 +390,24 @@ static int set_mixer_ad1848(int argc, char *argv[])
}
} else if (!strncasecmp(argv[0], "sl=", 3)) {
mask |= 16;
- if ((isrcl = parse_ad_src(argv[0]+3)) < 0) {
+ isrcl = parse_ad_src(argv[0] + 3);
+ if (isrcl < 0) {
fprintf(stderr, "invalid input source, must "
"be either line, aux1, mic or dac\n");
return -1;
}
} else if (!strncasecmp(argv[0], "sr=", 3)) {
mask |= 32;
- if ((isrcr = parse_ad_src(argv[0]+3)) < 0) {
+ isrcr = parse_ad_src(argv[0] + 3);
+ if (isrcr < 0) {
fprintf(stderr, "invalid input source, must "
"be either line, aux1, mic or dac\n");
return -1;
}
} else if (!strncasecmp(argv[0], "s=", 2)) {
mask |= 48;
- if ((isrcl = isrcr = parse_ad_src(argv[0]+2)) < 0) {
+ isrcl = isrcr = parse_ad_src(argv[0] + 2);
+ if (isrcl < 0) {
fprintf(stderr, "invalid input source, must "
"be either line, aux1, mic or dac\n");
return -1;