diff options
author | Dave Beckett <dave@dajobe.org> | 2011-05-22 14:23:06 -0700 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2011-05-22 14:23:06 -0700 |
commit | 1828a7b62b5cfa79e6ee2a472cfdd7d27b7b8dcc (patch) | |
tree | 3588ab8d4dddfcb08c5f4655107d02a1735519c1 /librdfa | |
parent | c644e3e92dea9fc118cbe286c37d2672cf144c36 (diff) | |
download | raptor-1828a7b62b5cfa79e6ee2a472cfdd7d27b7b8dcc.tar.gz |
Fixes from clang --analyze
(rdfa_resolve_uri): use rval_copy to alter final char from '/' not
rval, which is always NULL.
(rdfa_resolve_curie): Remove unused var 'expanded_prefix_length'
Diffstat (limited to 'librdfa')
-rw-r--r-- | librdfa/curie.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/librdfa/curie.c b/librdfa/curie.c index 796298fc..ef8bb63e 100644 --- a/librdfa/curie.c +++ b/librdfa/curie.c @@ -150,9 +150,9 @@ char* rdfa_resolve_uri(rdfacontext* context, const char* uri) rval_copy = rdfa_replace_string(rval, tmp); - if(rval[tlen] == '/') + if(rval_copy[tlen] == '/') { - rval[tlen] = '\0'; + rval_copy[tlen] = '\0'; } rval = rdfa_join_string(rval_copy, uri); free(rval_copy); @@ -227,7 +227,6 @@ char* rdfa_resolve_curie( char* prefix = NULL; char* curie_reference = NULL; const char* expanded_prefix = NULL; - size_t expanded_prefix_length = 0; working_copy = (char*)malloc(strlen(uri) + 1); strcpy(working_copy, uri);//rdfa_replace_string(working_copy, uri); @@ -297,12 +296,6 @@ char* rdfa_resolve_curie( } } - // get the length of the expanded prefix if it exists. - if(expanded_prefix != NULL) - { - expanded_prefix_length = strlen(expanded_prefix); - } - if((expanded_prefix != NULL) && (curie_reference != NULL)) { // if the expanded prefix and the reference exist, generate the |