aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-31 11:48:42 -0500
committerDavid Robillard <d@drobilla.net>2019-12-20 10:26:55 -0500
commit6644fef8c9f1fe9ccfbc049fe9f4a5e26448d7fd (patch)
tree4a1a1ee5fc25ba2e0da4d7ad9918e63836308475 /src/node.c
parent8ab439b7bc50533da52a8be232950b615d75c532 (diff)
downloadserd-6644fef8c9f1fe9ccfbc049fe9f4a5e26448d7fd.tar.gz
serd-6644fef8c9f1fe9ccfbc049fe9f4a5e26448d7fd.tar.bz2
serd-6644fef8c9f1fe9ccfbc049fe9f4a5e26448d7fd.zip
Fix various warnings and conversion issues
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/node.c b/src/node.c
index 36b7644f..b6e5f01d 100644
--- a/src/node.c
+++ b/src/node.c
@@ -29,15 +29,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef _WIN32
-# ifndef isnan
-# define isnan(x) _isnan(x)
-# endif
-# ifndef isinf
-# define isinf(x) (!_finite(x))
-# endif
-#endif
-
static const size_t serd_node_align = sizeof(SerdNode);
static SerdNode*
@@ -465,6 +456,7 @@ is_uri_path_char(const char c)
if (is_alpha(c) || is_digit(c)) {
return true;
}
+
switch (c) {
case '-': case '.': case '_': case '~': // unreserved
case ':': case '@': // pchar
@@ -577,7 +569,7 @@ serd_digits(double abs)
SerdNode*
serd_new_decimal(double d, unsigned frac_digits, const SerdNode* datatype)
{
- if (isnan(d) || isinf(d)) {
+ if (!isfinite(d)) {
return NULL;
}