summaryrefslogtreecommitdiffstats
path: root/lasso/xml/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'lasso/xml/errors.c')
-rw-r--r--lasso/xml/errors.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lasso/xml/errors.c b/lasso/xml/errors.c
index a3ee1ce0..0351cc88 100644
--- a/lasso/xml/errors.c
+++ b/lasso/xml/errors.c
@@ -30,8 +30,6 @@
const char*
lasso_strerror(int error_code)
{
- char msg[256];
-
switch (error_code) {
case LASSO_XML_ERROR_NODE_NOT_FOUND:
return "Unable to get '%s' child of '%s' element.\n";
@@ -82,7 +80,6 @@ lasso_strerror(int error_code)
return "The error return location should be either NULL or contains a NULL error.\n";
default:
- sprintf(msg, "Undefined error code %d.", error_code);
- return strdup(msg);
+ return g_strdup_printf("Undefined error code %d.", error_code);
}
}