From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: From: Costin Chirvasuta Date: Fri, 12 Aug 2016 18:29:47 +0300 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] bufreset deletes b->nbl-1 blocks? Topicbox-Message-UUID: 971342cc-ead9-11e9-9d60-3106f5b1d025 > So isn't the memmove just to cover the case where you are > deleting a block that isn't at the very end? Yes, but from what I understand i is always lower. Say b->nbl starts at 10. i=b->nbl-1 so i=9. --i so i=8. Inside delblock b->nbl-- so b->nbl is 9. i wrote: > But delblock only calls memmove if i is less then b->nbl, which was > just decremented, correct? > > So isn't the memmove just to cover the case where you are > deleting a block that isn't at the very end? > > Jim >