From: Martin Mares Date: Tue, 5 Aug 2014 15:14:15 +0000 (+0200) Subject: Extended types: Fix constness issues X-Git-Tag: v6.1~3^2~7 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=52b4c5d762dadb55bc12ebf65f86dcfbe750eaed;p=libucw.git Extended types: Fix constness issues --- 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