diff options
author | Russ Allbery <eagle@eyrie.org> | 2018-03-31 19:07:17 -0700 |
---|---|---|
committer | Russ Allbery <eagle@eyrie.org> | 2018-04-01 16:14:31 -0700 |
commit | cb6b132904141b560f553df0e03287945dad1352 (patch) | |
tree | 13fb170c2295301c9cf852f945a01382310d16dc /client | |
parent | 62e412902ea3c8cd5a7d2c1349c4e073903c7f74 (diff) |
Add a check-cppcheck target and fix what it found
Add maintainer check-cppcheck target to run cppcheck across the source
base with a standard configuration. Fix all issues found by cppcheck.
Diffstat (limited to 'client')
-rw-r--r-- | client/api.c | 9 | ||||
-rw-r--r-- | client/remctl.c | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/client/api.c b/client/api.c index 1e7d9ad..1a989a5 100644 --- a/client/api.c +++ b/client/api.c @@ -11,8 +11,9 @@ * * Written by Russ Allbery <eagle@eyrie.org> * Based on work by Anton Ushakov - * Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012, 2013, - * 2014 The Board of Trustees of the Leland Stanford Junior University + * Copyright 2018 Russ Allbery <eagle@eyrie.org> + * Copyright 2002-2009, 2011-2014 + * The Board of Trustees of the Leland Stanford Junior University * * See LICENSE for licensing terms. */ @@ -140,7 +141,7 @@ remctl(const char *host, unsigned short port, const char *principal, const char **command) { struct remctl *r = NULL; - struct remctl_result *result = NULL; + struct remctl_result *result; enum remctl_output_type type; result = calloc(1, sizeof(struct remctl_result)); @@ -390,7 +391,7 @@ int remctl_open_addrinfo(struct remctl *r, const char *host, const struct addrinfo *ai, const char *principal) { - socket_type fd = INVALID_SOCKET; + socket_type fd; internal_reset(r); r->host = NULL; diff --git a/client/remctl.c b/client/remctl.c index 17ecc52..4625283 100644 --- a/client/remctl.c +++ b/client/remctl.c @@ -177,7 +177,6 @@ main(int argc, char *argv[]) if (argc < 2) usage(1); server_host = *argv++; - argc--; /* * If service_name isn't set, the remctl library uses host/<server> |