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

Re: [ogfs-dev]OGFS: can't read journal index (-12)

On Mon, 2003-05-12 at 15:02, Dominik Vogt wrote:
> On Mon, May 12, 2003 at 03:38:23PM +0800, Franco Broi wrote:
> I see.  It's because the error code is set before the test for the
> actual error condition.  I see this all over to ogfs code and I
> think it's a very bad idea because you have to keep the current
> contents of the return value in mind for the rest of the function.
> I'll commit a fix.

I have seen it at many places. I found it useful when most of the check
will return the same error and when success you explicitly say ret=0


ret = -ENOMEM;

ret= my_func1()
	goto out;
ret = my_func2()
	goto out
ret = 0;

	return ret;


Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions

Opengfs-devel mailing list

[Kernel]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Clusters]     [Linux RAID]     [Yosemite Hiking]     [Linux Resources]

Powered by Linux