]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
gcc 4.4: Remove a nop memset size 0 that annoys gcc
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>
Sun, 13 Sep 2009 19:10:56 +0000 (19:10 +0000)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Sun, 13 Sep 2009 19:10:56 +0000 (19:10 +0000)
This memset doesn't write beyond the end of the buffer.
(tmpbuf has size of 4).

Merged revisions 218184 via svnmerge from
http://svn.digium.com/svn/asterisk/trunk

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@218216 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_phone.c

index 7a767fa039a89bb6556edc3f71fb53dff2ca287a..3af1a17d2a0f4a12c5196bfea9adb0a3d167342c 100644 (file)
@@ -807,7 +807,6 @@ static int phone_write(struct ast_channel *ast, struct ast_frame *frame)
                   we have to pad it to 24 bytes still.  */
                if (frame->datalen == 4) {
                        if (p->silencesupression) {
-                               (void) memset(tmpbuf + 4, 0, sizeof(tmpbuf) - 4);
                                memcpy(tmpbuf, frame->data, 4);
                                expected = 24;
                                res = phone_write_buf(p, tmpbuf, expected, maxfr, 0);