On Sat, 19 Nov 2005, Pekka Enberg wrote:
> On 11/19/05, Phillip Hellewell <[email protected]> wrote:
> > + BUG();
> > + err = -EINVAL;
> > + goto out;
>
> Why do you want to BUG() and then handle the situation?
Because you can define BUG() to nothing (on embedded builds for example)
and then you would be screwed if you don't handle the error gracefully.
You should never assume something does not return, except perhaps a
panic() although someone might even get rid of that one day...
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]