diff options
author | George Joseph <gjoseph@digium.com> | 2016-06-28 07:22:24 -0600 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2016-06-28 13:56:38 -0500 |
commit | f3d236ca7fdf8b03106f1e50474ff6a79f3efb20 (patch) | |
tree | f274507a2b7b2e10580db46fe87d9b50b6ae0bb9 /funcs | |
parent | 73e2186195b4cd1cc764346b58b209ba1b7223bb (diff) |
BuildSystem: Fix a few issues hightlighted by gcc 6.x
gcc 6.1.1 caught a few more issues.
Made sure the unit tests still pass for the func_env and stdtime
issues.
ASTERISK-26157 #close
Change-Id: I6664d8f34a45bc1481d2a854481c7878b0c1cf8e
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_env.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/funcs/func_env.c b/funcs/func_env.c index 3c260a2fb..072714f19 100644 --- a/funcs/func_env.c +++ b/funcs/func_env.c @@ -624,7 +624,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; pos--) { LINE_COUNTER(pos, format, count); if (length < 0 && count * -1 == length) { @@ -1024,7 +1024,7 @@ static int file_write(struct ast_channel *chan, const char *cmd, char *data, con fclose(ff); return -1; } - for (pos = fbuf + sizeof(fbuf) - 1; pos > fbuf - 1; pos--) { + for (pos = fbuf + sizeof(fbuf) - 1; pos >= fbuf; pos--) { LINE_COUNTER(pos, newline_format, count); if (length < 0 && count * -1 == length) { |