On Tue, Dec 19, 2000 at 05:43:35PM -0700, Michael Oberg wrote:
> Shouldnt the patch read as follows?

> +  if (np == NULL)
> +    return ENOMEM;
> +

No, as netfs_make_node returns a void *, and not an error_t or something
like that. See for example a user in hostmux/hostmux.c:

  netfs_root_node = netfs_make_node (&root_nn);
  if (! netfs_root_node)
    error (5, ENOMEM, "Cannot create root node");

So you see, the NULL pointer returned is translated into an ENOMEM, just as
you expected that this should be the case somewhere.

Other places with a similar bug should indeed return ENOMEM. It depends on
the specification of the function (the return value, and what callers expect
to happen).

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED]
Marcus Brinkmann              GNU    http://www.gnu.org    [EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.marcus-brinkmann.de

_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to