Commit b4691ea5e088973f4d146a0f9a0ef24f480e3b24

Stefan Sperling 2018-04-02T11:11:43

simplify got_error_from_errno()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/lib/error.c b/lib/error.c
index 6eaa212..4f7f4ab 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -42,11 +42,9 @@ const struct got_error *
 got_error_from_errno()
 {
 	static struct got_error err;
-	static char msg[1024];
 
 	err.code = GOT_ERR_ERRNO;
-	strerror_r(errno, msg, sizeof(msg));
-	err.msg = msg;
+	err.msg = strerror(errno);
 	return &err;
 }