]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Sun, 19 Feb 2006 19:03:29 +0000 (19:03 +0000)
committerAutomerge script <automerge@asterisk.org>
Sun, 19 Feb 2006 19:03:29 +0000 (19:03 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10509 65c4cc65-6c06-0410-ace0-fbb531ad65f3

formats/format_sln.c

index c1a16618db26a5f0a06be4907a713ba2a20ed673..d155b09a2f442a0bc40797c25902b42b59c23189 100644 (file)
@@ -172,7 +172,6 @@ static int slinear_write(struct ast_filestream *fs, struct ast_frame *f)
 static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whence)
 {
        off_t offset=0,min,cur,max;
-       int res;
 
        min = 0;
        sample_offset <<= 1;
@@ -190,12 +189,7 @@ static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whenc
        }
        /* always protect against seeking past begining. */
        offset = (offset < min)?min:offset;
-       res = fseek(fs->f, offset, SEEK_SET);
-       /* Negative values indicate error */
-       if (res > -1)
-               return res / 2;
-       else
-               return res;
+       return fseek(fs->f, offset, SEEK_SET);
 }
 
 static int slinear_trunc(struct ast_filestream *fs)