Messages in this thread | | | Date | Wed, 03 Nov 2004 10:45:55 +0000 | From | Ross Kendall Axe <> | Subject | Re: question on common error-handling idiom |
| |
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
[unhandled content-type:application/pgp-signature] | |