diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2011-05-18 23:44:10 +0200 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2011-05-18 23:44:10 +0200 |
commit | b7cbdd0d774bbb5307511aacd8e09a873e7c894e (patch) | |
tree | ff736c295821c235aad02af503ae10f4d26e8ba5 /lasso/xml | |
parent | f455be43878b906324f5fa1b59a70195e59e2fe9 (diff) | |
download | lasso-b7cbdd0d774bbb5307511aacd8e09a873e7c894e.tar.gz lasso-b7cbdd0d774bbb5307511aacd8e09a873e7c894e.tar.xz lasso-b7cbdd0d774bbb5307511aacd8e09a873e7c894e.zip |
[xml] use g_strndup instead of strndup, as it is more portable
Diffstat (limited to 'lasso/xml')
-rw-r--r-- | lasso/xml/xml.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index 55f32457..80387568 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -31,8 +31,6 @@ * */ -#define _GNU_SOURCE /* for use of strndup */ - #include "private.h" #include <ctype.h> #include <errno.h> @@ -2538,7 +2536,7 @@ snippet_dump_any(gchar *key, gchar *value, xmlNode *xmlnode) message(G_LOG_LEVEL_WARNING, "Invalid attribute name: %s", key); return; } - ns_uri = strndup(key+1, end-(key+1)); + ns_uri = g_strndup(key+1, end-(key+1)); ns = get_or_define_ns(xmlnode, BAD_CAST ns_uri); xmlSetNsProp(xmlnode, ns, BAD_CAST key, BAD_CAST value); } else { |