bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Malloc patches, round 1 (reseting round count)


From: Igor Khavkine
Subject: Re: Malloc patches, round 1 (reseting round count)
Date: Wed, 1 Aug 2001 10:11:07 -0400
User-agent: Mutt/1.3.18i

On Wed, Aug 01, 2001 at 01:01:05PM +0200, Mark Kettenis wrote:
>    From: Igor Khavkine <i_khavki@alcor.concordia.ca>
>    Date: Wed, 1 Aug 2001 02:39:53 -0400
> 
>    I've looked through the comments to my eariler posts, and I've
>    made appropriate changes. Even the formatting. :-)
> 
> I can still spot some formatting problems.  

Hmm, I'd like to see where they are.

>    Libnetfs is in a separate patch because I had to modify some
>    other code to make sure the return value of an internal
>    function was checked and acted upon.
> 
> The fiddling with errno in netfs_make_protid makes me suspect there is
> a more elegant solution.

I fiddled with errno because the callers of this function expected
the error to be reported through errno. The reason I gave special
attention to ENOMEM is because the function is often called as
netfs_make_protid(netfs_make_peropen(...),...), and netfs_make_peropen
returns NULL if ENOMEM occurs. So assuming that any value of errno
other then ENOMEM is stale and does not report the actual error, it
is replaced with EINVAL. However upon second though this assumption
may not be valid since ENOMEM can also be stale.

This may be fixed by checking the return value of netfs_make_peropen()
every time it's called, but maybe there is a simpler way to handle
the error from netfs_make_protid().

Igor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]