Re: question on common error-handling idiom

From: Ross Kendall Axe
Date: Wed Nov 03 2004 - 05:52:05 EST


linux-os wrote:

There's something I've been wondering about for a while. There is a lot of code
in linux that looks something like this:

err = -ERRORCODE
if (error condition)
goto out;



I think it's just to get around the "uninitialized variable"
warning when the 'C' compiler doesn't know that it will
always be initialized.


gcc is smart enough to get this case right.

Ross

Attachment: signature.asc
Description: OpenPGP digital signature