Skip to content

Commit 563c17c

Browse files
elfringJonathan Corbet
authored andcommitted
Documentation-getdelays: Apply a recommendation from "checkpatch.pl" in main()
The script "checkpatch.pl" pointed out that assignments should usually not be performed within condition checks. Thus move the assignment for the variable "nl_sd" to a separate statement. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent b6e1404 commit 563c17c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Documentation/accounting/getdelays.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ int main(int argc, char *argv[])
375375
}
376376
}
377377

378-
if ((nl_sd = create_nl_socket(NETLINK_GENERIC)) < 0)
378+
nl_sd = create_nl_socket(NETLINK_GENERIC);
379+
if (nl_sd < 0)
379380
err(1, "error creating Netlink socket\n");
380381

381382

0 commit comments

Comments
 (0)