summaryrefslogtreecommitdiff
path: root/slirp
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2009-12-25 18:19:18 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-12-25 18:19:18 +0000
commitf0d98b0517097509e1ebe2ac333f1ed70e7ea4f1 (patch)
tree4bbefe3856a64df7f236db3a7ee4f15bf9e2e29b /slirp
parent5a41ecc5f28bc434e8f3b5868c9481ad423ae664 (diff)
downloadqemu-f0d98b0517097509e1ebe2ac333f1ed70e7ea4f1.tar.gz
qemu-f0d98b0517097509e1ebe2ac333f1ed70e7ea4f1.tar.bz2
qemu-f0d98b0517097509e1ebe2ac333f1ed70e7ea4f1.zip
slirp/misc.c: fix warning with _FORTIFY_SOURCE
CC slirp/misc.o cc1: warnings being treated as errors slirp/misc.c: In function 'fork_exec': slirp/misc.c:209: error: ignoring return value of 'write', declared with attribute warn_unused_result make: *** [slirp/misc.o] Error 1 Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'slirp')
-rw-r--r--slirp/misc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/slirp/misc.c b/slirp/misc.c
index c76ad8fefd..05f4fb329f 100644
--- a/slirp/misc.c
+++ b/slirp/misc.c
@@ -200,14 +200,8 @@ fork_exec(struct socket *so, const char *ex, int do_pty)
execvp(argv[0], (char **)argv);
/* Ooops, failed, let's tell the user why */
- {
- char buff[256];
-
- snprintf(buff, sizeof(buff),
- "Error: execvp of %s failed: %s\n",
- argv[0], strerror(errno));
- write(2, buff, strlen(buff)+1);
- }
+ fprintf(stderr, "Error: execvp of %s failed: %s\n",
+ argv[0], strerror(errno));
close(0); close(1); close(2); /* XXX */
exit(1);