diff options
author | jilles <jilles@FreeBSD.org> | 2011-03-05 13:27:13 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-03-05 13:27:13 +0000 |
commit | 1a2c2ccf00d839e96bbb9cb391027b14ec4e0d05 (patch) | |
tree | bf3a5f469de7c275fad2760418405b1e77622289 /bin/sh/arith_yylex.c | |
parent | 0525662d5901332ebbcb7efce6b84f542e493cfc (diff) | |
download | FreeBSD-src-1a2c2ccf00d839e96bbb9cb391027b14ec4e0d05.zip FreeBSD-src-1a2c2ccf00d839e96bbb9cb391027b14ec4e0d05.tar.gz |
sh: Fix some warnings in code for arithmetic expressions.
Submitted by: eadler
Diffstat (limited to 'bin/sh/arith_yylex.c')
-rw-r--r-- | bin/sh/arith_yylex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/sh/arith_yylex.c b/bin/sh/arith_yylex.c index 0d08a83..08e43a4 100644 --- a/bin/sh/arith_yylex.c +++ b/bin/sh/arith_yylex.c @@ -57,6 +57,7 @@ yylex() { int value; const char *buf = arith_buf; + char *end; const char *p; for (;;) { @@ -79,7 +80,8 @@ yylex() case '7': case '8': case '9': - yylval.val = strtoarith_t(buf, (char **)&arith_buf, 0); + yylval.val = strtoarith_t(buf, (char **)&end, 0); + arith_buf = end; return ARITH_NUM; case 'A': case 'B': |