diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-12-24 05:05:32 -0500 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2015-12-24 09:22:32 -0500 |
commit | 563c17cb20831d818fb27eedb7b3e883cd756135 (patch) | |
tree | b67d6e5e3343e1164c517d4f551bbbeea41aaebb /Documentation/accounting/getdelays.c | |
parent | b6e14040c8bd22cd70cf1fe0d70d382413012a4a (diff) |
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>
Diffstat (limited to 'Documentation/accounting/getdelays.c')
-rw-r--r-- | Documentation/accounting/getdelays.c | 3 |
1 files changed, 2 insertions, 1 deletions
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[]) | |||
375 | } | 375 | } |
376 | } | 376 | } |
377 | 377 | ||
378 | if ((nl_sd = create_nl_socket(NETLINK_GENERIC)) < 0) | 378 | nl_sd = create_nl_socket(NETLINK_GENERIC); |
379 | if (nl_sd < 0) | ||
379 | err(1, "error creating Netlink socket\n"); | 380 | err(1, "error creating Netlink socket\n"); |
380 | 381 | ||
381 | 382 | ||