提交 bc575e95 编写于 作者: B blueswir1

Fix some more warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6300 c046a42c-6fe2-441c-8c8c-71466251a162
上级 00766a4e
...@@ -107,7 +107,7 @@ int inet_listen(const char *str, char *ostr, int olen, ...@@ -107,7 +107,7 @@ int inet_listen(const char *str, char *ostr, int olen,
/* parse address */ /* parse address */
if (str[0] == ':') { if (str[0] == ':') {
/* no host given */ /* no host given */
strcpy(addr,""); addr[0] = '\0';
if (1 != sscanf(str,":%32[^,]%n",port,&pos)) { if (1 != sscanf(str,":%32[^,]%n",port,&pos)) {
fprintf(stderr, "%s: portonly parse error (%s)\n", fprintf(stderr, "%s: portonly parse error (%s)\n",
__FUNCTION__, str); __FUNCTION__, str);
......
...@@ -2546,7 +2546,7 @@ int vnc_display_open(DisplayState *ds, const char *display) ...@@ -2546,7 +2546,7 @@ int vnc_display_open(DisplayState *ds, const char *display)
char *dpy; char *dpy;
dpy = qemu_malloc(256); dpy = qemu_malloc(256);
if (strncmp(display, "unix:", 5) == 0) { if (strncmp(display, "unix:", 5) == 0) {
strcpy(dpy, "unix:"); pstrcpy(dpy, 256, "unix:");
vs->lsock = unix_listen(display+5, dpy+5, 256-5); vs->lsock = unix_listen(display+5, dpy+5, 256-5);
} else { } else {
vs->lsock = inet_listen(display, dpy, 256, SOCK_STREAM, 5900); vs->lsock = inet_listen(display, dpy, 256, SOCK_STREAM, 5900);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册