Hi,
Daniel Veillard wrote:
On Mon, Jan 16, 2006 at 09:48:32AM +0100, Stefan Kost wrote:
also this is imho better (forgot that tailing '\0';
the \0 is included by default in static C strings, so "xhtml" is
already 6 bytes and 0 terminated.
memcpy(namespace->prefix,"xhtml\0",6);
oki, lets make it
strncpy(namespace->prefix,"xhtml",6);
then. The point was the malloc(5) really :)
From a stylistic point of view I would avoid such code.
Daniel
Stefan
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml