Re: [PATCH] base-64 encoder upgrade

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Fri, 29 Apr 2011 12:13:41 -0600

On 04/29/2011 11:53 AM, Amos Jeffries wrote:
> 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.

Sorry, I did not realize we still have C code around.

Alex.
Received on Fri Apr 29 2011 - 18:15:02 MDT

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