Commit 8b566bbb authored by marko's avatar marko

branches/zip: Clean up.

cmp_rec_rec_with_match(): Initialize ret=0.  Remove assignments ret=0.

rec_init_offsets(): Remove bogus comment.
parent a2944816
...@@ -745,7 +745,7 @@ cmp_rec_rec_with_match( ...@@ -745,7 +745,7 @@ cmp_rec_rec_with_match(
ulint cur_field; /* current field number */ ulint cur_field; /* current field number */
ulint cur_bytes; /* number of already matched ulint cur_bytes; /* number of already matched
bytes in current field */ bytes in current field */
int ret = 3333; /* return value */ int ret = 0; /* return value */
ulint comp; ulint comp;
ut_ad(rec1 && rec2 && index); ut_ad(rec1 && rec2 && index);
...@@ -791,10 +791,8 @@ cmp_rec_rec_with_match( ...@@ -791,10 +791,8 @@ cmp_rec_rec_with_match(
if (rec_get_info_bits(rec1, comp) if (rec_get_info_bits(rec1, comp)
& REC_INFO_MIN_REC_FLAG) { & REC_INFO_MIN_REC_FLAG) {
if (rec_get_info_bits(rec2, comp) if (!(rec_get_info_bits(rec2, comp)
& REC_INFO_MIN_REC_FLAG) { & REC_INFO_MIN_REC_FLAG)) {
ret = 0;
} else {
ret = -1; ret = -1;
} }
...@@ -814,8 +812,6 @@ cmp_rec_rec_with_match( ...@@ -814,8 +812,6 @@ cmp_rec_rec_with_match(
/* We do not compare to an externally /* We do not compare to an externally
stored field */ stored field */
ret = 0;
goto order_resolved; goto order_resolved;
} }
...@@ -935,8 +931,9 @@ cmp_rec_rec_with_match( ...@@ -935,8 +931,9 @@ cmp_rec_rec_with_match(
ut_ad(cur_bytes == 0); ut_ad(cur_bytes == 0);
ret = 0; /* If we ran out of fields, rec1 was equal to rec2 up /* If we ran out of fields, rec1 was equal to rec2 up
to the common fields */ to the common fields */
ut_ad(ret == 0);
order_resolved: order_resolved:
ut_ad((ret >= - 1) && (ret <= 1)); ut_ad((ret >= - 1) && (ret <= 1));
......
...@@ -229,7 +229,6 @@ static ...@@ -229,7 +229,6 @@ static
void void
rec_init_offsets( rec_init_offsets(
/*=============*/ /*=============*/
/* out: the offsets */
const rec_t* rec, /* in: physical record */ const rec_t* rec, /* in: physical record */
dict_index_t* index, /* in: record descriptor */ dict_index_t* index, /* in: record descriptor */
ulint* offsets)/* in/out: array of offsets; ulint* offsets)/* in/out: array of offsets;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment