Maximal length for :bytes?

Julien ÉLIE julien at
Fri Sep 5 05:37:56 UTC 2008

Hi Russ,

>> In fact, it is stocked in a char buff[16] and the buff is "Bytes: %lu\r\n".
>> If :bytes is 1,234,567, the overview contains 123,456.
>> Should we allow more?  Is buff[18] enough?  (up to about 100MB for an
>> article!)
> I think this would be a good place to use asprintf and dynamically
> allocated memory rather than a static buffer.

It is what I did for Lines: whose real value was not taken into account
for the overview database.  I added a xasprintf call.
But I thought it was more optimal to have a global buffer (this buffer
for Bytes: is in a data structure, the same for a channel) because
it is not reallocated for each article.  Anyway, the loss in term
of performance is neglectable.

Julien ÉLIE

« Il ne faut compter que sur soi-même.
  Et encore, pas beaucoup. » (Tristan Bernard)

More information about the inn-workers mailing list