From: Sebastian Harl Date: Wed, 9 Apr 2014 14:25:29 +0000 (+0200) Subject: store_lookup_test: Fixed user-data passed to the lookup callback. X-Git-Tag: sysdb-0.1.0~132^2~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0ffb8790e4553c3a97a7f0ae3599b439acc2456c;p=sysdb.git store_lookup_test: Fixed user-data passed to the lookup callback. --- diff --git a/t/core/store_lookup_test.c b/t/core/store_lookup_test.c index 3b9a6d0..8aa730b 100644 --- a/t/core/store_lookup_test.c +++ b/t/core/store_lookup_test.c @@ -438,15 +438,15 @@ START_TEST(test_lookup) { "attribute.k1 != 'v2'", 3 }, }; - size_t i; int check, n; + size_t i; - i = 0; - check = sdb_store_lookup(NULL, lookup_cb, &i); + n = 0; + check = sdb_store_lookup(NULL, lookup_cb, &n); fail_unless(check == 0, "sdb_store_lookup() = %d; expected: 0", check); - fail_unless(i == 3, - "sdb_store_lookup called callback %d times; expected: 3", (int)i); + fail_unless(n == 3, + "sdb_store_lookup called callback %d times; expected: 3", (int)n); for (i = 0; i < SDB_STATIC_ARRAY_LEN(golden_data); ++i) { sdb_store_matcher_t *m = sdb_fe_parse_matcher(golden_data[i].query, -1);