removed warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1871 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2006-04-30 21:34:15 +00:00
parent 7f881e5674
commit 3f423c9c8f
3 changed files with 3 additions and 5 deletions

View File

@ -32,7 +32,7 @@ int slirp_add_exec(int do_pty, const char *args, int addr_low_byte,
int guest_port); int guest_port);
extern const char *tftp_prefix; extern const char *tftp_prefix;
extern const char slirp_hostname[33]; extern char slirp_hostname[33];
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -25,7 +25,7 @@ struct ex_list *exec_list;
/* XXX: suppress those select globals */ /* XXX: suppress those select globals */
fd_set *global_readfds, *global_writefds, *global_xfds; fd_set *global_readfds, *global_writefds, *global_xfds;
const char slirp_hostname[33]; char slirp_hostname[33];
#ifdef _WIN32 #ifdef _WIN32

4
vl.c
View File

@ -3132,9 +3132,7 @@ int net_client_init(const char *str)
#ifdef CONFIG_SLIRP #ifdef CONFIG_SLIRP
if (!strcmp(device, "user")) { if (!strcmp(device, "user")) {
if (get_param_value(buf, sizeof(buf), "hostname", p)) { if (get_param_value(buf, sizeof(buf), "hostname", p)) {
if (strlen(buf) > 32) pstrcpy(slirp_hostname, sizeof(slirp_hostname), buf);
buf[32] = 0;
strcpy(slirp_hostname, buf);
} }
ret = net_slirp_init(vlan); ret = net_slirp_init(vlan);
} else } else