[Olsr-dev] status tip + BSD

Henning Rogge (spam-protected)
Thu Jan 29 14:16:04 CET 2009

Am Thursday 29 January 2009 14:09:11 schrieb Bernd Petrovitsch:
> On Thu, 2009-01-29 at 13:18 +0100, Henning Rogge wrote:
> [...]
> > The first one contains strlcpy as source (with the name strscpy ?)...
> Yes, using strlcpy() would have been a much better idea than to invent
> the n+1. wheel^Winterface again.
> And use strdup() (+ strndup()[0]) instead of malloc()+strcpy() in the
> first place.
> strdup()/strndup() are quite old and IMHO well-known and strlcpy() is
> also not really new.
> > The second one implements a automatically growing string buffer.
> >
> > Maybe we could use autobuf in the config parser too ?
> Makes IMHO not that much sense (except for the config-file generator
> funtion). The autobuf was designed for growing large buffers which
> automagically expand as needed.
Look at the read_cfg_cat() function in olsr_cfg.c
It implements an automatically growing buffer. I think that's a duplicate of 
autobuf function.


Diplom Informatiker Henning Rogge
Forschungsgesellschaft für
Angewandte Naturwissenschaften e. V. (FGAN) 
Neuenahrer Str. 20, 53343 Wachtberg, Germany
Tel.: 0049 (0)228 9435-961
Fax: 0049 (0)228 9435-685
E-Mail: (spam-protected)
Web: www.fgan.de
Sitz der Gesellschaft: Bonn
Registergericht: Amtsgericht Bonn VR 2530
Vorstand: Dr. rer. nat. Ralf Dornhaus (Vors.), Prof. Dr. Joachim Ender 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20090129/ab263b2d/attachment.sig>

More information about the Olsr-dev mailing list