summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorSeokYeon Hwang <syeon.hwang@samsung.com>2014-07-08 18:05:32 +0900
committerSeokYeon Hwang <syeon.hwang@samsung.com>2014-07-08 18:07:03 +0900
commitf3fe789008b8b2d17590c98e4831845fca294da5 (patch)
treecce29ef7a2e99c72484fa784071122abdf166c82 /util
parent8ee44f37a59f8d2cc48c3b3c095bb910f23bc681 (diff)
downloadqemu-f3fe789008b8b2d17590c98e4831845fca294da5.tar.gz
qemu-f3fe789008b8b2d17590c98e4831845fca294da5.tar.bz2
qemu-f3fe789008b8b2d17590c98e4831845fca294da5.zip
emulator: fix bad usage of "strerror()"
Change-Id: Ic9cd037a0f39f98a0102394cb30731ea11a199da Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Diffstat (limited to 'util')
-rw-r--r--util/error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/error.c b/util/error.c
index f11f1d57a0..9dcde42e8c 100644
--- a/util/error.c
+++ b/util/error.c
@@ -71,7 +71,7 @@ void error_set_errno(Error **errp, int os_errno, ErrorClass err_class,
va_start(ap, fmt);
msg1 = g_strdup_vprintf(fmt, ap);
if (os_errno != 0) {
- err->msg = g_strdup_printf("%s: %s", msg1, strerror(os_errno));
+ err->msg = g_strdup_printf("%s: %s", msg1, strerror(abs(os_errno)));
g_free(msg1);
} else {
err->msg = msg1;