From 52b4c5d762dadb55bc12ebf65f86dcfbe750eaed Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 5 Aug 2014 17:14:15 +0200 Subject: [PATCH] Extended types: Fix constness issues --- ucw/xtypes.c | 2 +- ucw/xtypes.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ucw/xtypes.c b/ucw/xtypes.c index da6486d3..08172b47 100644 --- a/ucw/xtypes.c +++ b/ucw/xtypes.c @@ -18,7 +18,7 @@ static const char * const fmt_names[] = { [XTYPE_FMT_PRETTY] = "pretty", }; -const char *xtype_parse_fmt(struct xtype *xt, const char *str, u32 *dest, struct mempool *pool) +const char *xtype_parse_fmt(const struct xtype *xt, const char *str, u32 *dest, struct mempool *pool) { for (uint i=0; i < ARRAY_SIZE(fmt_names); i++) if (!strcmp(str, fmt_names[i])) diff --git a/ucw/xtypes.h b/ucw/xtypes.h index 19a41609..20edf1a9 100644 --- a/ucw/xtypes.h +++ b/ucw/xtypes.h @@ -93,7 +93,7 @@ struct xtype { * * The generic modes are called `default`, `raw`, and `pretty`. **/ -const char *xtype_parse_fmt(struct xtype *xt, const char *str, u32 *dest, struct mempool *pool); +const char *xtype_parse_fmt(const struct xtype *xt, const char *str, u32 *dest, struct mempool *pool); /** * Construct a string representation of a formatting mode. It is a wrapper -- 2.39.2