summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordevzero2000 <devzero2000>2014-01-08 09:33:42 +0000
committerdevzero2000 <devzero2000>2014-01-08 09:33:42 +0000
commit1b103fb6979e85c8978401e199038dd5311cd4ab (patch)
treefb70580ddce414f9a10bb470a102f29d9856ea2b
parent7c6bfa2d2516b4b077de7ee1e2d36cd0bb36f1a6 (diff)
downloadlibpopt-1b103fb6979e85c8978401e199038dd5311cd4ab.tar.gz
poptconfig.c reduce variables scope (cppcheck warning)
-rw-r--r--CHANGES1
-rw-r--r--poptconfig.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 58145aa..242ee46 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,5 @@
1.17 -> 2.0:
+ - devzero2000: poptconfig.c reduce variables scope (cppcheck warning)
- devzero2000: add cppcheck conditional makefile target
- devzero2000: drop expr syntax error in make check under dash
- devzero2000: Print to the end of the configure phase the options we have
diff --git a/poptconfig.c b/poptconfig.c
index 63804d5..ad33eba 100644
--- a/poptconfig.c
+++ b/poptconfig.c
@@ -167,7 +167,6 @@ int poptReadFile(const char * fn, char ** bp, size_t * nbp, int flags)
int fdno;
char * b = NULL;
off_t nb = 0;
- char * s, * t, * se;
int rc = POPT_ERROR_ERRNO; /* assume failure */
fdno = open(fn, O_RDONLY);
@@ -197,6 +196,7 @@ int poptReadFile(const char * fn, char ** bp, size_t * nbp, int flags)
if (flags & POPT_READFILE_TRIMNEWLINES)
/*@=bitwisesigned@*/
{
+ char * s, * t, * se;
for (t = b, s = b, se = b + nb; *s && s < se; s++) {
switch (*s) {
case '\\':