projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix return correct relation when not using configuration file
[yaz-moved-to-github.git]
/
src
/
matchstr.c
diff --git
a/src/matchstr.c
b/src/matchstr.c
index
82aa006
..
832ec45
100644
(file)
--- a/
src/matchstr.c
+++ b/
src/matchstr.c
@@
-92,6
+92,20
@@
int yaz_memcmp(const void *a, const void *b, size_t len_a, size_t len_b)
return len_a - len_b;
}
+int yaz_strcmp_null(const char *v1, const char *v2)
+{
+ if (v1)
+ {
+ if (v2)
+ return strcmp(v1, v2);
+ else
+ return 1;
+ }
+ else if (v2)
+ return -1;
+ return 0;
+}
+
/*
* Local variables:
* c-basic-offset: 4