On 3/9/2011 12:40 PM, Jeff Trawick wrote:
> 
> The original code was a bit disturbing because of the indentation:
> 
>     /* mark all the columns as needing SQLGetData unless they are bound  */
>     for (c = 0; c < res->ncols; c++) {
>         if (res->colstate[c] != COL_BOUND)
>             res->colstate[c] = COL_AVAIL;
>             /* some drivers do not null-term zero-len CHAR data */
>             if (res->colptrs[c] )
>                 * (char *) res->colptrs[c] = 0;
>     }
> 
> From the indentation, it looks like the second 'if' is part of a block
> starting with res->colstate[c] = COL_AVAIL.

Someone perhaps had a bit too much Python on their brain?  :)

> The behavior stayed the same across the reformat, and I can't confirm
> that the original code was broken, but still...

Jumping back across whitespace changes, this originates at Tom's original
checkin... Tom, can you verify if the behavior is correct and fix the
indentation, or fix the code if the scope isn't correct?

Reply via email to