Re: [PATCH] base-64 encoder upgrade

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 30 Apr 2011 05:53:36 +1200

On 30/04/11 02:18, Amos Jeffries wrote:
> On 29/04/11 12:38, Alex Rousskov wrote:
>> On 04/27/2011 11:01 PM, Amos Jeffries wrote:
<snip>
>>> +int
>>> +base64_decode_len(const char *data)
>>> +{
>>> + int i, j;
>>> +
>>> + if (!data || !*data)
>>> + return 0;
>>> +
>>> + j = 0;
>>> + for (i = strlen(data) - 1; i>= 0; i--) {
>>
>> The "j" variable can be declared when initialized.
>> The "i" variable can be made local to the loop.
>
> Can it? this being one of the rare old-C code sections I took it as
> having the declare before any code style all the rest does. Trying the
> change now.

Nope, "C99 mode" errors.

function re-defined errors when removing the old_ prefix from the old
API and overloading the C function name.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.12
   Beta testers wanted for 3.2.0.7 and 3.1.12.1
Received on Fri Apr 29 2011 - 17:53:40 MDT

This archive was generated by hypermail 2.2.0 : Sat Apr 30 2011 - 12:00:06 MDT