Re: patch: use err, not errno

2002-03-15 Thread Marcus Brinkmann
On Thu, Mar 14, 2002 at 07:47:06PM -0800, James Morrison wrote: > it would make things more consistant. Are there any more consistancy > things I should look for while reading through more code? Some wrong formatting slipped through, like "if ( foo == bar )", drop the spaces close to the parens,

Re: patch: use err, not errno

2002-03-14 Thread James Morrison
--- "Thomas Bushnell, BSG" <[EMAIL PROTECTED]> wrote: > James Morrison <[EMAIL PROTECTED]> writes: > > > > > I've also changed !var to var == MACH_PORT_NULL where > > > > appropriate because some documentation, mach.texi, says > > > > MACH_PORT_NULL is not assumed to be 0 in the Hurd system. > >

Re: patch: use err, not errno

2002-03-14 Thread Thomas Bushnell, BSG
James Morrison <[EMAIL PROTECTED]> writes: > > > I've also changed !var to var == MACH_PORT_NULL where > > > appropriate because some documentation, mach.texi, says > > > MACH_PORT_NULL is not assumed to be 0 in the Hurd system. > > > > This is always fine. > Yes, but I wanted to be consistant

Re: patch: use err, not errno

2002-03-14 Thread James Morrison
--- Roland McGrath <[EMAIL PROTECTED]> wrote: > Several of those instances used perror and you didn't change them. > Changing them to use `error' instead of perror or perror and exit > is fine. > I'd have to examine all the surrounding code more closely to be > sure there > aren't other cases whe

Re: patch: use err, not errno

2002-03-14 Thread James Morrison
--- "Thomas Bushnell, BSG" <[EMAIL PROTECTED]> wrote: > James A Morrison <[EMAIL PROTECTED]> writes: > > > Ok, I've grep'd through the hurd source looking for instances of > errno being > > assigned directly. These seem to be the places where setting > errno isn't > > right. > > What's the

Re: patch: use err, not errno

2002-03-14 Thread Thomas Bushnell, BSG
Roland McGrath <[EMAIL PROTECTED]> writes: > > What's the reason for this? > > Getting at the thread-local errno tends to be rather a pain in gdb. And > the overhead of locating the thread-local errno slot is pretty spurious in > these cases when compared to a local variable that's just a regis

Re: patch: use err, not errno

2002-03-14 Thread Roland McGrath
> What's the reason for this? Getting at the thread-local errno tends to be rather a pain in gdb. And the overhead of locating the thread-local errno slot is pretty spurious in these cases when compared to a local variable that's just a register. ___

Re: patch: use err, not errno

2002-03-14 Thread Roland McGrath
Several of those instances used perror and you didn't change them. Changing them to use `error' instead of perror or perror and exit is fine. I'd have to examine all the surrounding code more closely to be sure there aren't other cases where the code calls something that uses errno. _

Re: patch: use err, not errno

2002-03-14 Thread Thomas Bushnell, BSG
James A Morrison <[EMAIL PROTECTED]> writes: > Ok, I've grep'd through the hurd source looking for instances of errno being > assigned directly. These seem to be the places where setting errno isn't > right. What's the reason for this? > I've also changed !var to var == MACH_PORT_NULL where

patch: use err, not errno

2002-03-14 Thread James A Morrison
Ok, I've grep'd through the hurd source looking for instances of errno being assigned directly. These seem to be the places where setting errno isn't right. I've also changed !var to var == MACH_PORT_NULL where appropriate because some documentation, mach.texi, says MACH_PORT_NULL is not ass