From 6fe3e98af68bc1fb2c593395a71dbedb96d4d52f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 7 Feb 2017 21:27:54 +0100 Subject: Fix restriction count reporting --- src/sord_validate.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sord_validate.c b/src/sord_validate.c index 50ed462..c36dc09 100644 --- a/src/sord_validate.c +++ b/src/sord_validate.c @@ -1,5 +1,5 @@ /* - Copyright 2012-2016 David Robillard + Copyright 2012-2017 David Robillard Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -89,7 +89,7 @@ print_version(void) { printf("sord_validate " SORD_VERSION " \n"); - printf("Copyright 2012-2016 David Robillard .\n" + printf("Copyright 2012-2017 David Robillard .\n" "License: \n" "This is free software; you are free to change and redistribute it." "\nThere is NO WARRANTY, to the extent permitted by law.\n"); @@ -240,7 +240,6 @@ check_restriction(SordModel* model, { size_t len = 0; const char* str = (const char*)sord_node_get_string_counted(literal, &len); - ++n_restrictions; // Check xsd:pattern SordIter* p = sord_search(model, restriction, uris->xsd_pattern, 0, 0); @@ -255,6 +254,7 @@ check_restriction(SordModel* model, return false; } sord_iter_free(p); + ++n_restrictions; } // Check xsd:minInclusive @@ -270,6 +270,7 @@ check_restriction(SordModel* model, return false; } sord_iter_free(l); + ++n_restrictions; } // Check xsd:maxInclusive @@ -285,9 +286,9 @@ check_restriction(SordModel* model, return false; } sord_iter_free(u); + ++n_restrictions; } - --n_restrictions; return true; // Unknown restriction, be quietly tolerant } -- cgit v1.2.1