diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2026-05-11 20:03:21 +1000 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-05-12 00:04:08 +0200 |
| commit | 97e478b40d4154cf007641f1e247cc3fef8392ad (patch) | |
| tree | 639f5345c46e67b37debe062e0c67dcc6ed2ea09 | |
| parent | 90f175d82dabfa564122e98949f5abb5590d89d1 (diff) | |
| download | passt-97e478b40d4154cf007641f1e247cc3fef8392ad.tar passt-97e478b40d4154cf007641f1e247cc3fef8392ad.tar.gz passt-97e478b40d4154cf007641f1e247cc3fef8392ad.tar.bz2 passt-97e478b40d4154cf007641f1e247cc3fef8392ad.tar.lz passt-97e478b40d4154cf007641f1e247cc3fef8392ad.tar.xz passt-97e478b40d4154cf007641f1e247cc3fef8392ad.tar.zst passt-97e478b40d4154cf007641f1e247cc3fef8392ad.zip | |
treewide: Make some additional variables static
Mark a number of extra variables local to a single module as static.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
| -rw-r--r-- | conf.c | 2 | ||||
| -rw-r--r-- | log.c | 2 | ||||
| -rw-r--r-- | tcp.c | 6 | ||||
| -rw-r--r-- | tcp_buf.c | 4 |
4 files changed, 7 insertions, 7 deletions
@@ -67,7 +67,7 @@ {{{ 0xfe, 0x80, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0x01 }}} -const char *pasta_default_ifn = "tap0"; +static const char *pasta_default_ifn = "tap0"; /** * add_dns4() - Possibly add the IPv4 address of a DNS resolver to configuration @@ -85,7 +85,7 @@ static int logtime_fmt(char *buf, size_t size, const struct timespec *ts) } /* Prefixes for log file messages, indexed by priority */ -const char *logfile_prefix[] = { +static const char *logfile_prefix[] = { NULL, NULL, NULL, /* Unused: LOG_EMERG, LOG_ALERT, LOG_CRIT */ "ERROR: ", "WARNING: ", @@ -370,8 +370,8 @@ enum { */ #define TCP_MIGRATE_SND_QUEUE_MAX (64 << 20) #define TCP_MIGRATE_RCV_QUEUE_MAX (64 << 20) -uint8_t tcp_migrate_snd_queue [TCP_MIGRATE_SND_QUEUE_MAX]; -uint8_t tcp_migrate_rcv_queue [TCP_MIGRATE_RCV_QUEUE_MAX]; +static uint8_t tcp_migrate_snd_queue [TCP_MIGRATE_SND_QUEUE_MAX]; +static uint8_t tcp_migrate_rcv_queue [TCP_MIGRATE_RCV_QUEUE_MAX]; #define TCP_MIGRATE_RESTORE_CHUNK_MIN 1024 /* Try smaller when above this */ @@ -420,7 +420,7 @@ char tcp_buf_discard [BUF_DISCARD_SIZE]; bool peek_offset_cap; /* Size of data returned by TCP_INFO getsockopt() */ -socklen_t tcp_info_size; +static socklen_t tcp_info_size; #define tcp_info_cap(f_) \ ((offsetof(struct tcp_info_linux, tcpi_##f_) + \ @@ -45,8 +45,8 @@ static struct ethhdr tcp_eth_hdr[TCP_FRAMES_MEM]; static struct tap_hdr tcp_payload_tap_hdr[TCP_FRAMES_MEM]; /* IP headers for IPv4 and IPv6 */ -struct iphdr tcp4_payload_ip[TCP_FRAMES_MEM]; -struct ipv6hdr tcp6_payload_ip[TCP_FRAMES_MEM]; +static struct iphdr tcp4_payload_ip[TCP_FRAMES_MEM]; +static struct ipv6hdr tcp6_payload_ip[TCP_FRAMES_MEM]; /* TCP segments with payload for IPv4 and IPv6 frames */ static struct tcp_payload_t tcp_payload[TCP_FRAMES_MEM]; |
