summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4cf5f66)
raw | patch | inline | side by side (parent: 4cf5f66)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 11 Jun 2014 09:37:28 +0000 (11:37 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 11 Jun 2014 09:37:28 +0000 (11:37 +0200) |
The old name was still from the times the project was called syscollector ;-)
src/include/utils/dbi.h | patch | blob | history | |
src/utils/dbi.c | patch | blob | history | |
t/unit/utils/dbi_test.c | patch | blob | history |
index 9d5cfc05cc66dd552be7073c225e8baacf896ee1..af2c8a44ecb1da78acc6ed8de7581e1445da0c2e 100644 (file)
--- a/src/include/utils/dbi.h
+++ b/src/include/utils/dbi.h
#include <stddef.h>
/* translate libdbi types to SysDB types */
-#define DBI_TYPE_TO_SC(dt) \
+#define DBI_TYPE_TO_SDB(dt) \
(((dt) == DBI_TYPE_INTEGER) \
? SDB_TYPE_INTEGER \
: ((dt) == DBI_TYPE_DECIMAL) \
diff --git a/src/utils/dbi.c b/src/utils/dbi.c
index b1fdaf127896aaf35863ec1a8cfd208c62982d6d..73fc6b77a4e2582b431ac109a1e9147f66535360 100644 (file)
--- a/src/utils/dbi.c
+++ b/src/utils/dbi.c
sdb_dbi_strerror(client->conn));
return -1;
}
- types[i] = DBI_TYPE_TO_SC(types[i]);
+ types[i] = DBI_TYPE_TO_SDB(types[i]);
}
num_rows = dbi_result_get_numrows(res);
unsigned int type = va_arg(types, unsigned int);
- field_type = DBI_TYPE_TO_SC(field_type);
+ field_type = DBI_TYPE_TO_SDB(field_type);
/* column count starts at 1 */
if ((unsigned int)field_type != type) {
index 1ad96d123f6b6431b87f8cfc3a83872ccc37fb1b..2935940182f268bd36b68291e68bf30b8b8c6256 100644 (file)
--- a/t/unit/utils/dbi_test.c
+++ b/t/unit/utils/dbi_test.c
user_data, TEST_MAGIC);
for (i = 0; i < n; ++i) {
- int expected_type = DBI_TYPE_TO_SC(current_query->field_types[i]);
+ int expected_type = DBI_TYPE_TO_SDB(current_query->field_types[i]);
mock_data_t expected_data;
fail_unless((int)data[i].type == expected_type,