Unix Technical Forum

Re: Two patches for lib/libc/db/hash/hash.c

This is a discussion on Re: Two patches for lib/libc/db/hash/hash.c within the mailing.openbsd.tech forums, part of the OpenBSD category; --> On Sun, Apr 6, 2008 at 2:21 AM, patrick keshishian <sidster@boxsoft.com> wrote: .... > The first diff has nothing ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-07-2008, 08:36 AM
Philip Guenther
 
Posts: n/a
Default Re: Two patches for lib/libc/db/hash/hash.c

On Sun, Apr 6, 2008 at 2:21 AM, patrick keshishian <sidster@boxsoft.com> wrote:
....
> The first diff has nothing to do with the above problem. It is
> a sequence point evaluation fix.

....
> rbufp->flags |= BUF_PIN;
> - for (bp = (u_int16_t *)rbufp->page, n = *bp++, ndx = 1; ndx < n
> + bp = (u_int16_t *)rbufp->page;
> + n = *bp++;
> + for (ndx = 1; ndx < n {
> if (bp[1] >= REAL_KEY) {



Maybe I'm blind, but I don't see any sequence-point issues in the
original code there: the comma operator introduces a sequence-point
between the assignment to bp and the *bp++.


Philip Guenther

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:43 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com