diff options
author | David Gibson <dgibson@redhat.com> | 2025-03-05 17:15:03 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2025-03-07 02:21:24 +0100 |
commit | 57d2db370b9c12aca84901d968c2c31db89ca462 (patch) | |
tree | eab9bdd1bc39b91685a79dbcd21dea81919062d1 | |
parent | 68b04182e07da6a437479cb191e5468db382bc56 (diff) | |
download | passt-57d2db370b9c12aca84901d968c2c31db89ca462.tar passt-57d2db370b9c12aca84901d968c2c31db89ca462.tar.gz passt-57d2db370b9c12aca84901d968c2c31db89ca462.tar.bz2 passt-57d2db370b9c12aca84901d968c2c31db89ca462.tar.lz passt-57d2db370b9c12aca84901d968c2c31db89ca462.tar.xz passt-57d2db370b9c12aca84901d968c2c31db89ca462.tar.zst passt-57d2db370b9c12aca84901d968c2c31db89ca462.zip |
treewide: Mark assorted functions static
This marks static a number of functions which are only used in their .c
file, have no prototypes in a .h and were never intended to be globally
exposed.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | log.c | 2 | ||||
-rw-r--r-- | netlink.c | 2 | ||||
-rw-r--r-- | passt.c | 2 | ||||
-rw-r--r-- | tcp.c | 6 |
4 files changed, 6 insertions, 6 deletions
@@ -56,7 +56,7 @@ bool log_stderr = true; /* Not daemonised, no shell spawned */ * * Return: pointer to @now, or NULL if there was an error retrieving the time */ -const struct timespec *logtime(struct timespec *ts) +static const struct timespec *logtime(struct timespec *ts) { if (clock_gettime(CLOCK_MONOTONIC, ts)) return NULL; @@ -355,7 +355,7 @@ unsigned int nl_get_ext_if(int s, sa_family_t af) * * Return: true if a gateway was found, false otherwise */ -bool nl_route_get_def_multipath(struct rtattr *rta, void *gw) +static bool nl_route_get_def_multipath(struct rtattr *rta, void *gw) { int nh_len = RTA_PAYLOAD(rta); struct rtnexthop *rtnh; @@ -166,7 +166,7 @@ void proto_update_l2_buf(const unsigned char *eth_d, const unsigned char *eth_s) * * #syscalls exit_group */ -void exit_handler(int signal) +static void exit_handler(int signal) { (void)signal; @@ -2497,7 +2497,7 @@ static void tcp_ns_sock_init6(const struct ctx *c, in_port_t port) * @c: Execution context * @port: Port, host order */ -void tcp_ns_sock_init(const struct ctx *c, in_port_t port) +static void tcp_ns_sock_init(const struct ctx *c, in_port_t port) { ASSERT(!c->no_tcp); @@ -3141,7 +3141,7 @@ static int tcp_flow_dump_rcvqueue(int s, struct tcp_tap_transfer_ext *t) * * Return: 0 on success, negative error code on failure */ -int tcp_flow_repair_opt(int s, const struct tcp_tap_transfer_ext *t) +static int tcp_flow_repair_opt(int s, const struct tcp_tap_transfer_ext *t) { const struct tcp_repair_opt opts[] = { { TCPOPT_WINDOW, t->snd_ws + (t->rcv_ws << 16) }, @@ -3333,7 +3333,7 @@ fail: * * Return: 0 on success, negative error code on failure */ -int tcp_flow_repair_socket(struct ctx *c, struct tcp_tap_conn *conn) +static int tcp_flow_repair_socket(struct ctx *c, struct tcp_tap_conn *conn) { sa_family_t af = CONN_V4(conn) ? AF_INET : AF_INET6; const struct flowside *sockside = HOSTFLOW(conn); |