Messages in this thread | | | Date | Wed, 03 Nov 2004 09:11:52 +0100 | From | GNicz <> | Subject | Re: question on common error-handling idiom |
| |
Some code parts is using diffirent error handling.
if(err1) { clenup1; return -ERR1; }
...
if(err2) { cleanup2; return -ERR2; }
Shouldn't it be converted into:
err = -ERR1; if(err1) goto cleanup1;
...
err = -ERR2; if(err2) goto cleanup2;
I think there should be one methond, which will be used in all kernel code.
Regards, GNicz - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |