remove unnecessary cast
diff --git a/lib/error.c b/lib/error.c
index 7063a0b..1df8f21 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -58,7 +58,7 @@ got_error_msg(int code, const char *msg)
if (code == got_errors[i].code) {
err.code = code;
err.msg = msg;
- return (const struct got_error *)&err;
+ return &err;
}
}