Re: [xml] how to set or reset a namespace prefix?
- From: Stefan Kost <ensonic hora-obscura de>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] how to set or reset a namespace prefix?
- Date: Mon, 16 Jan 2006 13:57:19 +0100
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]