Return-Path: Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: (qmail 47417 invoked from network); 8 Feb 2011 18:40:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Feb 2011 18:40:51 -0000 Received: (qmail 28570 invoked by uid 500); 8 Feb 2011 18:40:51 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 28469 invoked by uid 500); 8 Feb 2011 18:40:49 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 28457 invoked by uid 99); 8 Feb 2011 18:40:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Feb 2011 18:40:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Feb 2011 18:40:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C1BC623889D7; Tue, 8 Feb 2011 18:40:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1068516 - /subversion/trunk/subversion/libsvn_subr/stream.c Date: Tue, 08 Feb 2011 18:40:25 -0000 To: commits@subversion.apache.org From: blair@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110208184025.C1BC623889D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: blair Date: Tue Feb 8 18:40:25 2011 New Revision: 1068516 URL: http://svn.apache.org/viewvc?rev=1068516&view=rev Log: Seeking in an APR stream with a stream marker should not modify the marker under any circumstances. * subversion/libsvn_subr/stream.c (seek_handler_apr): Do not modify the offset inside a struct mark_apr, the APR stream specific svn_stream_mark_t. Modified: subversion/trunk/subversion/libsvn_subr/stream.c Modified: subversion/trunk/subversion/libsvn_subr/stream.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/stream.c?rev=1068516&r1=1068515&r2=1068516&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_subr/stream.c (original) +++ subversion/trunk/subversion/libsvn_subr/stream.c Tue Feb 8 18:40:25 2011 @@ -611,19 +611,9 @@ static svn_error_t * seek_handler_apr(void *baton, svn_stream_mark_t *mark) { struct baton_apr *btn = baton; + apr_off_t offset = (mark != NULL) ? ((const struct mark_apr *)mark)->off : 0; - if (mark != NULL) - { - struct mark_apr *mark_apr; - - mark_apr = (struct mark_apr *)mark; - SVN_ERR(svn_io_file_seek(btn->file, APR_SET, &mark_apr->off, btn->pool)); - } - else - { - apr_off_t offset = 0; - SVN_ERR(svn_io_file_seek(btn->file, APR_SET, &offset, btn->pool)); - } + SVN_ERR(svn_io_file_seek(btn->file, APR_SET, &offset, btn->pool)); return SVN_NO_ERROR; }