Dirk Nehring dixit:
>> >-+ *tptr = *((ulong *)pdata)++;
>> >++ *tptr = *((ulong *)pdata);
>> >++ pdata++;
>> > + CRC_INNER_LOOP(32, crc, tmp[0]);
>> > + CRC_INNER_LOOP(32, crc, tmp[1]);
>> > + CRC_INNER_LOOP(32, crc, tmp[2]);
>>
>> This one already is wrong.
>
>Would be "*pdata++" correct?
As far as I understand, the first line has three components
on the right side of the equals sign. *tptr = abc;
a = *
b = ((ulong *)pdata)
c = ++
First, a and b are combined, therefore doing a
*tptr = *((ulong *)pdata);
Then, b and c are combined (post-increment):
((ulong *)pdata)++;
The effect depends on the size of both. You could
probably write something like
pdata += (sizeof (ulong) / sizeof (*pdata));
but it may be better to do that manually.
If I'm wrong, someone please correct me.
//mirabile
--
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence. -- Coywolf Qi Hunt
_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers