From daba307035faf4cc01f1ccb883b21281d91234cc Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 28 Jul 2017 14:10:07 +0200 Subject: 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 --- hdlcutil/smdiag.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hdlcutil/smdiag.c') diff --git a/hdlcutil/smdiag.c b/hdlcutil/smdiag.c index cb354f1..17ef026 100644 --- a/hdlcutil/smdiag.c +++ b/hdlcutil/smdiag.c @@ -368,8 +368,10 @@ int main(int argc, char *argv[]) } printmode(mode, trigger); for (;;) { - if ((ret = hdrvc_diag2(mode, trigger, data, sizeof(data) / sizeof(short), - &samplesperbit)) < 0) { + ret = hdrvc_diag2(mode, trigger, data, + sizeof(data) / sizeof(short), + &samplesperbit); + if (ret < 0) { perror("hdrvc_diag2"); exit(1); } -- cgit v1.2.3