Skip to content

Commit

Permalink
initialize cursor's domain as NIL.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jul 8, 2009
1 parent 4acdca6 commit ae8804b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/hash.c
Expand Up @@ -388,6 +388,7 @@ grn_array_cursor_open(grn_ctx *ctx, grn_array *array, grn_id min, grn_id max, in
c->array = array;
c->ctx = ctx;
c->obj.header.flags = flags;
c->obj.header.domain = GRN_ID_NIL;
if (flags & GRN_CURSOR_DESCENDING) {
c->dir = -1;
if (max) {
Expand Down Expand Up @@ -1476,6 +1477,7 @@ grn_hash_cursor_open(grn_ctx *ctx, grn_hash *hash,
c->hash = hash;
c->ctx = ctx;
c->obj.header.flags = flags;
c->obj.header.domain = GRN_ID_NIL;
if (flags & GRN_CURSOR_DESCENDING) {
c->dir = -1;
if (max) {
Expand Down
1 change: 1 addition & 0 deletions lib/pat.c
Expand Up @@ -1678,6 +1678,7 @@ grn_pat_cursor_open(grn_ctx *ctx, grn_pat *pat,
c->ss = NULL;
c->limit = 0;
c->curr_rec = GRN_ID_NIL;
c->obj.header.domain = GRN_ID_NIL;
if (flags & GRN_CURSOR_DESCENDING) {
if (min) {
set_cursor_ascend(ctx, pat, c, min, min_size, flags);
Expand Down

0 comments on commit ae8804b

Please sign in to comment.