How are we doing?
Huw Davies
h.davies1 at physics.ox.ac.uk
Fri Jun 2 06:42:33 CDT 2006
On Fri, Jun 02, 2006 at 08:25:42PM +0900, Mike McCormack wrote:
>
> >>lack of comments in the code
> >
> >+1, I think it's horrifying.
>
> void the_function_that_adds_one_to_i(int i)
> {
> /* this adds one to i */
> i = i + 1;
>
> /* this returns i to the caller */
> return i;
> }
There's a bug in this code, let's try this:
/* change by Huw Davies 02-Jun-2006, to fix the return type of the function */
int the_function_that_adds_one_to_i(int i)
{
/* this adds one to i */
i = i + 1;
/* this returns i to the caller */
return i;
}
That's so much better ;-)
Huw.
--
Huw Davies
huw at codeweavers.com
More information about the wine-devel
mailing list