From 97c9a620ae5828af639f57319eea8e10d84af0ed Mon Sep 17 00:00:00 2001 From: himajin100000 Date: Mon, 8 Apr 2019 16:19:36 +0900 Subject: Documentation says "0 on failure." At least size_t >= 0 --- src/turtle_common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/turtle_common.c b/src/turtle_common.c index f721516c..a75f3059 100644 --- a/src/turtle_common.c +++ b/src/turtle_common.c @@ -236,7 +236,7 @@ raptor_turtle_expand_qname_escapes(unsigned char *name, unsigned char *d; if(!name) - return -1; + return 0; for(s = name, d = name, i = 0; i < len; s++, i++) { unsigned char c=*s; @@ -271,7 +271,7 @@ raptor_turtle_expand_qname_escapes(unsigned char *name, if(i+ulen > len) { error_handler(error_data, "Turtle name error - \\%c over end of line", c); - return 1; + return 0; } for(ii = 0; ii < ulen; ii++) { @@ -280,7 +280,7 @@ raptor_turtle_expand_qname_escapes(unsigned char *name, error_handler(error_data, "Turtle name error - illegal hex digit %c in Unicode escape '%c%s...'", cc, c, s); - return 1; + return 0; } } @@ -289,7 +289,7 @@ raptor_turtle_expand_qname_escapes(unsigned char *name, error_handler(error_data, "Turtle name error - illegal Uncode escape '%c%s...'", c, s); - return 1; + return 0; } s+= ulen-1; @@ -299,7 +299,7 @@ raptor_turtle_expand_qname_escapes(unsigned char *name, error_handler(error_data, "Turtle name error - illegal Unicode character with code point #x%lX (max #x%lX).", unichar, raptor_unicode_max_codepoint); - return 1; + return 0; } unichar_width = raptor_unicode_utf8_string_put_char(unichar, d, @@ -308,7 +308,7 @@ raptor_turtle_expand_qname_escapes(unsigned char *name, error_handler(error_data, "Turtle name error - illegal Unicode character with code point #x%lX.", unichar); - return 1; + return 0; } d += (size_t)unichar_width; -- cgit v1.2.1