diff options
author | Russ Allbery <rra@stanford.edu> | 2013-02-22 12:57:45 -0800 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2013-02-22 16:49:54 -0800 |
commit | 51c3c86d3ff2d4c0be736b67613da9dad4a284be (patch) | |
tree | 97cd93ba8f3e07fd042aec46b5669496fef71cb4 /util | |
parent | 085f0b66214099779e795577da0bcad3f2ef4740 (diff) |
Coding style and improvements to new remctl_open_*
Fix various warnings. Pre-declare the addrinfo and sockaddr structs
in remctl.h so that the header is still standalone. Install symlinks
for the manual page for the new documented APIs. Add the new functions
to the symbol export maps. Make network_connect more const-correct.
Change-Id: I1fbc5e62444161957dca24b9f85b3bb0ed22719a
Reviewed-on: https://gerrit.stanford.edu/810
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'util')
-rw-r--r-- | util/network.c | 4 | ||||
-rw-r--r-- | util/network.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/util/network.c b/util/network.c index dba75a8..c131aa8 100644 --- a/util/network.c +++ b/util/network.c @@ -20,7 +20,7 @@ * which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>. * * Written by Russ Allbery <rra@stanford.edu> - * Copyright 2009, 2011, 2012 + * Copyright 2009, 2011, 2012, 2013 * The Board of Trustees of the Leland Stanford Junior University * Copyright (c) 2004, 2005, 2006, 2007, 2008 * by Internet Systems Consortium, Inc. ("ISC") @@ -424,7 +424,7 @@ network_source(socket_type fd, int family, const char *source) * errno. */ socket_type -network_connect(struct addrinfo *ai, const char *source, time_t timeout) +network_connect(const struct addrinfo *ai, const char *source, time_t timeout) { socket_type fd = INVALID_SOCKET; int oerrno, status, err; diff --git a/util/network.h b/util/network.h index f04a65c..600d7e1 100644 --- a/util/network.h +++ b/util/network.h @@ -5,7 +5,7 @@ * which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>. * * Written by Russ Allbery <rra@stanford.edu> - * Copyright 2009, 2010, 2011, 2012 + * Copyright 2009, 2010, 2011, 2012, 2013 * The Board of Trustees of the Leland Stanford Junior University * Copyright (c) 2004, 2005, 2006, 2007, 2008, 2010 * by Internet Systems Consortium, Inc. ("ISC") @@ -85,7 +85,8 @@ socket_type network_accept_any(socket_type fds[], unsigned int count, * -1 on failure, with the error left in errno. Takes an optional source * address and a timeout in seconds, which may be 0 for no timeout. */ -socket_type network_connect(struct addrinfo *, const char *source, time_t) +socket_type network_connect(const struct addrinfo *, const char *source, + time_t) __attribute__((__nonnull__(1))); /* |