From f3fe789008b8b2d17590c98e4831845fca294da5 Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Tue, 8 Jul 2014 18:05:32 +0900 Subject: [PATCH] emulator: fix bad usage of "strerror()" Change-Id: Ic9cd037a0f39f98a0102394cb30731ea11a199da Signed-off-by: SeokYeon Hwang --- util/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1