aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index 245177a..8dc0708 100644
--- a/vl.c
+++ b/vl.c
@@ -8978,9 +8978,10 @@ int main(int argc, char **argv)
/* init network clients */
if (nb_net_clients == 0) {
/* if no clients, we use a default config */
- net_clients[0] = "nic";
- net_clients[1] = "user";
- nb_net_clients = 2;
+ net_clients[nb_net_clients++] = "nic";
+#ifdef CONFIG_SLIRP
+ net_clients[nb_net_clients++] = "user";
+#endif
}
for(i = 0;i < nb_net_clients; i++) {