apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe Jr." <wr...@rowe-clan.net>
Subject Re: svn commit: r1078507 - /apr/apr/trunk/dbd/apr_dbd_odbc.c
Date Wed, 09 Mar 2011 18:54:02 GMT
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?

Mime
View raw message