projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5a0bd82
)
Fix warning and code WRT uninit var (sort)
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 28 Feb 2011 13:15:36 +0000
(14:15 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 28 Feb 2011 13:15:36 +0000
(14:15 +0100)
index/zsets.c
patch
|
blob
|
history
diff --git
a/index/zsets.c
b/index/zsets.c
index
cbe2b52
..
4a8c74c
100644
(file)
--- a/
index/zsets.c
+++ b/
index/zsets.c
@@
-905,7
+905,6
@@
ZEBRA_RES resultSetSortSingle(ZebraHandle zh, NMEM nmem,
{
Z_SortKeySpec *sks = sort_sequence->specs[i];
Z_SortKey *sk;
{
Z_SortKeySpec *sks = sort_sequence->specs[i];
Z_SortKey *sk;
- ZEBRA_RES res;
sort_criteria[i].ord = (int *)
nmem_malloc(nmem, sizeof(int)*numbases);
sort_criteria[i].ord = (int *)
nmem_malloc(nmem, sizeof(int)*numbases);
@@
-977,13
+976,12
@@
ZEBRA_RES resultSetSortSingle(ZebraHandle zh, NMEM nmem,
for (ib = 0; ib < numbases; ib++)
{
zebraExplain_curDatabase(zh->reg->zei, zh->basenames[ib]);
for (ib = 0; ib < numbases; ib++)
{
zebraExplain_curDatabase(zh->reg->zei, zh->basenames[ib]);
- res = zebra_sort_get_ord(zh, sk->u.sortAttributes,
- &sort_criteria[i].ord[ib],
- &sort_criteria[i].numerical[ib]);
+ if (zebra_sort_get_ord(zh, sk->u.sortAttributes,
+ &sort_criteria[i].ord[ib],
+ &sort_criteria[i].numerical[ib]) !=
+ ZEBRA_OK && sks->which != Z_SortKeySpec_null)
+ return ZEBRA_FAIL;
}
}
-
- if (sks->which != Z_SortKeySpec_null && res != ZEBRA_OK)
- return ZEBRA_FAIL;
break;
}
/* right now we look up the index type based on the first database
break;
}
/* right now we look up the index type based on the first database