From 9a80a7f894d56ed07cbebdc50aa91b90244bafc3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 5 May 2011 06:30:43 +0000 Subject: Replace strlen of string constants with sizeof. git-svn-id: http://svn.drobilla.net/serd/trunk@159 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- src/reader.c | 6 +++--- 1 file 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); -- cgit v1.2.1