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 --- dmascc/dmascc_cfg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dmascc') diff --git a/dmascc/dmascc_cfg.c b/dmascc/dmascc_cfg.c index 229090e..4e92a8c 100644 --- a/dmascc/dmascc_cfg.c +++ b/dmascc/dmascc_cfg.c @@ -96,7 +96,8 @@ int main(int argc, char *argv[]) return 1; } - if ((sk = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + sk = socket(AF_INET, SOCK_DGRAM, 0); + if (sk < 0) { perror("socket"); return 2; } -- cgit v1.2.3