From: Markus Elfring Date: Thu, 24 Dec 2015 10:05:32 +0000 (+0100) Subject: Documentation-getdelays: Apply a recommendation from "checkpatch.pl" in main() X-Git-Tag: v4.5-rc1~81^2~7 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=563c17cb20831d818fb27eedb7b3e883cd756135;p=linux.git 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 Signed-off-by: Jonathan Corbet --- diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index f40578026a04..7785fb5eb93f 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c @@ -375,7 +375,8 @@ int main(int argc, char *argv[]) } } - if ((nl_sd = create_nl_socket(NETLINK_GENERIC)) < 0) + nl_sd = create_nl_socket(NETLINK_GENERIC); + if (nl_sd < 0) err(1, "error creating Netlink socket\n");