summaryrefslogtreecommitdiff
path: root/funcs/func_env.c
diff options
context:
space:
mode:
authorWalter Doekes <walter+asterisk@wjd.nu>2012-04-17 18:57:40 +0000
committerWalter Doekes <walter+asterisk@wjd.nu>2012-04-17 18:57:40 +0000
commitfc63e07135d645af0df8d393aa84c0ae3b7e1924 (patch)
treef40524fe8e0facf5542c6b02041bc1fc63eae66e /funcs/func_env.c
parent70c5ac6635062efe03b51fb6c7afd30c22028be9 (diff)
Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: junky Review: https://reviewboard.asterisk.org/r/1743/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_env.c')
-rw-r--r--funcs/func_env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/funcs/func_env.c b/funcs/func_env.c
index 2e10fc228..e849816c3 100644
--- a/funcs/func_env.c
+++ b/funcs/func_env.c
@@ -600,7 +600,7 @@ static int file_read(struct ast_channel *chan, const char *cmd, char *data, stru
ast_log(LOG_ERROR, "Cannot seek to offset %" PRId64 ": %s\n", i, strerror(errno));
}
end = fread(fbuf, 1, sizeof(fbuf), ff);
- for (pos = end < sizeof(fbuf) ? fbuf + end - 1 : fbuf + sizeof(fbuf) - 1; pos > fbuf - 1; pos--) {
+ for (pos = (end < sizeof(fbuf) ? fbuf + end - 1 : fbuf + sizeof(fbuf) - 1); pos > fbuf - 1; pos--) {
LINE_COUNTER(pos, format, count);
if (length < 0 && count * -1 == length) {