summaryrefslogtreecommitdiffstats
path: root/bin/sh/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/parser.c')
-rw-r--r--bin/sh/parser.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c
index 2bba84e..e7ec010 100644
--- a/bin/sh/parser.c
+++ b/bin/sh/parser.c
@@ -1195,7 +1195,8 @@ parsebackq(char *out, struct nodelist **pbqlist,
static char *
readcstyleesc(char *out)
{
- int c, v, i, n;
+ int c, vc, i, n;
+ unsigned int v;
c = pgetc();
switch (c) {
@@ -1310,12 +1311,12 @@ readcstyleesc(char *out)
default:
synerror("Bad escape sequence");
}
- v = (char)v;
+ vc = (char)v;
/*
* We can't handle NUL bytes.
* POSIX says we should skip till the closing quote.
*/
- if (v == '\0') {
+ if (vc == '\0') {
while ((c = pgetc()) != '\'') {
if (c == '\\')
c = pgetc();
@@ -1332,9 +1333,9 @@ readcstyleesc(char *out)
pungetc();
return out;
}
- if (SQSYNTAX[v] == CCTL)
+ if (SQSYNTAX[vc] == CCTL)
USTPUTC(CTLESC, out);
- USTPUTC(v, out);
+ USTPUTC(vc, out);
return out;
}
OpenPOWER on IntegriCloud