diff options
Diffstat (limited to 'lib/e2p/errcode.c')
-rw-r--r-- | lib/e2p/errcode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/e2p/errcode.c b/lib/e2p/errcode.c index 7e426553..1627c9d7 100644 --- a/lib/e2p/errcode.c +++ b/lib/e2p/errcode.c @@ -7,6 +7,8 @@ #include <stdlib.h> #include <string.h> +#include "e2p.h" + static const char *err_string[] = { "", "UNKNOWN", /* 1 */ @@ -32,14 +34,14 @@ static const char *err_string[] = { (sizeof(array) / sizeof(array[0])) /* Return the name of an encoding or NULL */ -const char *e2p_errcode2str(int err) +const char *e2p_errcode2str(unsigned int err) { static char buf[32]; if (err < ARRAY_SIZE(err_string)) return err_string[err]; - sprintf(buf, "UNKNOWN_ERRCODE_%d", err); + sprintf(buf, "UNKNOWN_ERRCODE_%u", err); return buf; } |