diff --git a/gobex/gobex.c b/gobex/gobex.c
index e9b89ce..fdeb11c 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
guint8 constants;
} __attribute__ ((packed));
-static struct error_code {
+static const struct error_code {
guint8 code;
const char *name;
} obex_errors[] = {
const char *g_obex_strerror(guint8 err_code)
{
- struct error_code *error;
+ const struct error_code *error;
for (error = obex_errors; error->name != NULL; error++) {
if (error->code == err_code)
return FALSE;
}
-static GDebugKey keys[] = {
+static const GDebugKey keys[] = {
{ "error", G_OBEX_DEBUG_ERROR },
{ "command", G_OBEX_DEBUG_COMMAND },
{ "transfer", G_OBEX_DEBUG_TRANSFER },
const char *env = g_getenv("GOBEX_DEBUG");
if (env) {
- gobex_debug = g_parse_debug_string(env, keys, 7);
+ gobex_debug = g_parse_debug_string(env, keys,
+ G_N_ELEMENTS(keys));
g_setenv("G_MESSAGES_DEBUG", "gobex", FALSE);
} else
gobex_debug = G_OBEX_DEBUG_NONE;