aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-28 18:09:10 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-28 18:09:10 +0200
commitd2e3b9411bfd52ed2a5c61c01ffd056be0694850 (patch)
treee6681dfa8260c584ed52fb025e633603e3325ba0
parent48a1779efb686a965148b3fb8228c99d9dbd1594 (diff)
downloadmblaze-d2e3b9411bfd52ed2a5c61c01ffd056be0694850.tar.gz
mpick: drop const
-rw-r--r--mpick.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mpick.c b/mpick.c
index aeefff5..1dadf84 100644
--- a/mpick.c
+++ b/mpick.c
@@ -151,7 +151,7 @@ ws()
}
static int
-token(const char *token)
+token(char *token)
{
if (strncmp(pos, token, strlen(token)) == 0) {
pos += strlen(token);
@@ -163,7 +163,7 @@ token(const char *token)
}
static void
-parse_error(const char *msg, ...)
+parse_error(char *msg, ...)
{
va_list ap;
va_start(ap, msg);
@@ -282,7 +282,7 @@ parse_string(char **s)
buf[len] = 0;
pos++;
ws();
- *s = buf ? buf : (char *) "";
+ *s = buf ? buf : "";
return 1;
} else if (*pos == '$') {
char t;
@@ -297,7 +297,7 @@ parse_string(char **s)
*pos = 0;
*s = getenv(e);
if (!*s)
- *s = (char *) "";
+ *s = "";
*pos = t;
ws();
return 1;
@@ -607,9 +607,9 @@ parse_or()
}
static struct expr *
-parse_expr(const char *s)
+parse_expr(char *s)
{
- pos = (char *)s;
+ pos = s;
struct expr *e = parse_or();
if (*pos)
parse_error("trailing garbage at '%.15s'", pos);
@@ -617,7 +617,7 @@ parse_expr(const char *s)
}
static struct expr *
-parse_msglist(const char *s)
+parse_msglist(char *s)
{
int64_t n, m;
int r;
@@ -669,10 +669,10 @@ parse_msglist(const char *s)
e2->a.expr = e1;
return e2;
default:
- pos = (char *)s;
+ pos = s;
if (((d = strchr(s, ':')) || (d = strchr(s, '-')))
- && parse_num(&n) && (pos = (char *)d + 1) && parse_num(&m)) {
+ && parse_num(&n) && (pos = d + 1) && parse_num(&m)) {
/* index >= n */
e1 = mkexpr(EXPR_GE);
e1->a.prop = PROP_INDEX;