]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
net: make nb_nics and nd_table[] static in net/net.c
authorDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 23 Oct 2023 08:38:01 +0000 (09:38 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Mon, 8 Jan 2024 13:50:17 +0000 (13:50 +0000)
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
include/net/net.h
net/net.c
system/globals.c

index 19fb82833cd4a900438f067e4e9f89e999699b9b..766201c62c07d590a4b7508aa42c4627a345d0ed 100644 (file)
@@ -247,10 +247,6 @@ struct NICInfo {
     int nvectors;
 };
 
-extern int nb_nics;
-extern NICInfo nd_table[MAX_NICS];
-extern const char *host_net_devices[];
-
 /* from net.c */
 extern NetClientStateList net_clients;
 bool netdev_is_modern(const char *optstr);
index 09ab0889f53e7c31601317080372dc5ed8c0e3d5..71cccb19da9e80a487e801c83cfe8d674dba3ac7 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -77,6 +77,9 @@ static NetdevQueue nd_queue = QSIMPLEQ_HEAD_INITIALIZER(nd_queue);
 
 static GHashTable *nic_model_help;
 
+static int nb_nics;
+static NICInfo nd_table[MAX_NICS];
+
 /***********************************************************/
 /* network device redirectors */
 
index e83b5428d122f1b4bbc0a542547de31d2e3058c8..b6d4e72530ed187646c8619deee13a017c1fbfc9 100644 (file)
@@ -36,8 +36,6 @@ int display_opengl;
 const char* keyboard_layout;
 bool enable_mlock;
 bool enable_cpu_pm;
-int nb_nics;
-NICInfo nd_table[MAX_NICS];
 int autostart = 1;
 int vga_interface_type = VGA_NONE;
 bool vga_interface_created;