summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 92162ac)
raw | patch | inline | side by side (parent: 92162ac)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 5 Oct 2014 17:19:49 +0000 (19:19 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 5 Oct 2014 17:19:49 +0000 (19:19 +0200) |
So far, this doesn't make a difference but it's better style anyway.
src/core/data.c | patch | blob | history | |
src/include/core/data.h | patch | blob | history |
diff --git a/src/core/data.c b/src/core/data.c
index 968e99de5003b4ff1e7b061de6922928f950b655..1188b4030ba4215304c4f7a47ae25e68a5feb49f 100644 (file)
--- a/src/core/data.c
+++ b/src/core/data.c
CMP_NULL(d1, d2);
if (d1->type != d2->type)
- return -1;
+ return SDB_CMP(d1->type, d2->type);
switch (d1->type) {
case SDB_TYPE_INTEGER:
index 6e4d3174e4c45bb42397345a58719c2b888ac27f..02f99c5313ebc33ce18a6826cd33740ec364802a 100644 (file)
--- a/src/include/core/data.h
+++ b/src/include/core/data.h
/*
* sdb_data_cmp:
* Compare two data points. A NULL datum is considered less than any non-NULL
- * datum. On data-type mismatch, the function always returns a negative value.
+ * datum. On data-type mismatch, the function always returns a non-zero value.
*
* Returns:
* - a value less than zero if d1 compares less than d2