aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-05 06:30:43 +0000
committerDavid Robillard <d@drobilla.net>2011-05-05 06:30:43 +0000
commit9a80a7f894d56ed07cbebdc50aa91b90244bafc3 (patch)
tree90d2e07c7a11608b2108e1ce2253c05f22da646a /src
parent944e5eb3faac9c3186dfae3d8c1fada6abdc06a6 (diff)
downloadserd-9a80a7f894d56ed07cbebdc50aa91b90244bafc3.tar.gz
serd-9a80a7f894d56ed07cbebdc50aa91b90244bafc3.tar.bz2
serd-9a80a7f894d56ed07cbebdc50aa91b90244bafc3.zip
Replace strlen of string constants with sizeof.
git-svn-id: http://svn.drobilla.net/serd/trunk@159 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src')
-rw-r--r--src/reader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reader.c b/src/reader.c
index 0c8de15d..739112ce 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -860,11 +860,11 @@ read_number(SerdReader* reader, Node* dest)
default: break;
}
read_0_9(reader, str, true);
- datatype = push_string(reader, XSD_DOUBLE, strlen(XSD_DOUBLE) + 1);
+ datatype = push_string(reader, XSD_DOUBLE, sizeof(XSD_DOUBLE));
} else if (has_decimal) {
- datatype = push_string(reader, XSD_DECIMAL, strlen(XSD_DECIMAL) + 1);
+ datatype = push_string(reader, XSD_DECIMAL, sizeof(XSD_DECIMAL));
} else {
- datatype = push_string(reader, XSD_INTEGER, strlen(XSD_INTEGER) + 1);
+ datatype = push_string(reader, XSD_INTEGER, sizeof(XSD_INTEGER));
}
*dest = make_node(SERD_LITERAL, str, datatype, 0);
assert(dest->value);