apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Donovan <donov...@bellatlantic.net>
Subject Re: svn commit: r1078507 - /apr/apr/trunk/dbd/apr_dbd_odbc.c
Date Fri, 11 Mar 2011 00:32:39 GMT
On 3/9/2011 1:54 PM, William A. Rowe Jr. wrote:
> 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?
>
Done.  Change 1080403.  The behavior was correct, the indenting wasn't.

Sorry about the disturbing indentation.

-tom-



Mime
View raw message