diff options
author | David Robillard <d@drobilla.net> | 2024-09-27 13:06:20 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-09-27 18:16:57 -0400 |
commit | 287e07ebaa5fbcf9be0ce0cb1981798fc04bc9f1 (patch) | |
tree | 727a8a5e95e37f5c679d6391254913f3d9303b7b /test/test_reader_writer.c | |
parent | 771215229522e203eba802bc041a1d8105de9283 (diff) | |
download | serd-287e07ebaa5fbcf9be0ce0cb1981798fc04bc9f1.tar.gz serd-287e07ebaa5fbcf9be0ce0cb1981798fc04bc9f1.tar.bz2 serd-287e07ebaa5fbcf9be0ce0cb1981798fc04bc9f1.zip |
Make function parameters const wherever possible
The early history of this code didn't tend to make parameters const, but the
"const density" is high enough now that I often find myself wondering if
something is mutable for some reason, or just old and sloppier. So, eliminate
this confusion by making (hopefully) all function parameters const if possible.
Diffstat (limited to 'test/test_reader_writer.c')
-rw-r--r-- | test/test_reader_writer.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c index 0ed26794..6b84b1e6 100644 --- a/test/test_reader_writer.c +++ b/test/test_reader_writer.c @@ -54,14 +54,14 @@ static const char* const doc_string = "( eg:o ) eg:t eg:u .\n"; static SerdStatus -test_statement_sink(void* handle, - SerdStatementFlags flags, - const SerdNode* graph, - const SerdNode* subject, - const SerdNode* predicate, - const SerdNode* object, - const SerdNode* object_datatype, - const SerdNode* object_lang) +test_statement_sink(void* const handle, + const SerdStatementFlags flags, + const SerdNode* const graph, + const SerdNode* const subject, + const SerdNode* const predicate, + const SerdNode* const object, + const SerdNode* const object_datatype, + const SerdNode* const object_lang) { (void)flags; (void)subject; @@ -264,7 +264,7 @@ test_writer(const char* const path) } static void -test_reader(const char* path) +test_reader(const char* const path) { ReaderTest* rt = (ReaderTest*)calloc(1, sizeof(ReaderTest)); SerdReader* reader = serd_reader_new( |