[Top][All Lists]

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

Re: some nfs clean up's I found

From: Niels Möller
Subject: Re: some nfs clean up's I found
Date: 10 Nov 2002 14:28:44 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Roland McGrath <roland@gnu.org> writes:

> I don't think those are very usefu.

I guess your point is that it doesn't matter if the nfs-client
translator crashes (resulting in EGRATIOUS to the caller?) or returns
some other error when it runs out of memory. If it's a passive
translator, it will be restarted when needed.

However, I think code like

   nn = malloc (sizeof (struct netnode));
   assert (nn);

is a misuse of assert. The code will crash in different ways if you
compile it with or without NDEBUG. If one doesn't want to deal with
malloc failures, it's better to explicitly call abort on failure,
preferably by uing xmalloc instead of malloc.


reply via email to

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