summaryrefslogtreecommitdiffstats
path: root/bin/sh/arith.y
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2009-12-24 18:41:14 +0000
committerjilles <jilles@FreeBSD.org>2009-12-24 18:41:14 +0000
commit8e458de8523a07bb3be5f06ed227236cb12be7f4 (patch)
tree3810323287749c3a09fadeeed64429a5bf2fbb4d /bin/sh/arith.y
parentff49e8168bd001a89cc6ca577b7b33399eb2c409 (diff)
downloadFreeBSD-src-8e458de8523a07bb3be5f06ed227236cb12be7f4.zip
FreeBSD-src-8e458de8523a07bb3be5f06ed227236cb12be7f4.tar.gz
sh: Constify various strings.
Most of this is adding const keywords, but setvar() in var.c had to be changed somewhat more.
Diffstat (limited to 'bin/sh/arith.y')
-rw-r--r--bin/sh/arith.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/sh/arith.y b/bin/sh/arith.y
index 542fc44..133a1b8 100644
--- a/bin/sh/arith.y
+++ b/bin/sh/arith.y
@@ -265,7 +265,7 @@ expr:
#define YYPARSE_PARAM_TYPE arith_t *
#define YYPARSE_PARAM result
-char *arith_buf, *arith_startbuf;
+const char *arith_buf, *arith_startbuf;
int yylex(void);
int yyparse(YYPARSE_PARAM_TYPE);
@@ -284,7 +284,7 @@ arith_assign(char *name, arith_t value)
}
arith_t
-arith(char *s)
+arith(const char *s)
{
arith_t result;
@@ -299,7 +299,7 @@ arith(char *s)
}
static void
-yyerror(char *s)
+yyerror(const char *s)
{
yyerrok;
@@ -354,7 +354,7 @@ main(int argc, char *argv[])
printf("%d\n", exp(argv[1]));
}
-error(char *s)
+error(const char *s)
{
fprintf(stderr, "exp: %s\n", s);
exit(1);
OpenPOWER on IntegriCloud