diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2013-09-08 21:23:30 +0200 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2013-09-08 21:33:58 +0200 |
commit | 05a01a824715de7e8e5d3d65b73e8fc855e5dad9 (patch) | |
tree | a5979b4c36219198bf5f4934494273ee819b416f /lasso/xml/xml.c | |
parent | b6faccae0fabfd7e47fc6b86a06fc78367446526 (diff) | |
download | lasso-05a01a824715de7e8e5d3d65b73e8fc855e5dad9.tar.gz lasso-05a01a824715de7e8e5d3d65b73e8fc855e5dad9.tar.xz lasso-05a01a824715de7e8e5d3d65b73e8fc855e5dad9.zip |
fix compilation errors on 64bits architectures
* sizeof(unsigned int) != sizeof(size_t)
* INT_MAX != LONG_MAX
Diffstat (limited to 'lasso/xml/xml.c')
-rw-r--r-- | lasso/xml/xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index e3ac905d..488cd5d8 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -1295,7 +1295,7 @@ snippet_set_value(LassoNode *node, LassoNodeClass *class, struct XmlSnippet *sni value = SNIPPET_STRUCT_MEMBER_P(node, g_type, snippet); if (snippet->type & SNIPPET_INTEGER) { int val = strtol((char*)content, NULL, 10); - if (((val == LONG_MIN || val == LONG_MAX) && errno == ERANGE) + if (((val == INT_MIN || val == INT_MAX) && errno == ERANGE) || errno == EINVAL || val < 0) { if (snippet->type & SNIPPET_OPTIONAL_NEG) { val = -1; |