Commit d8639d00 authored by marko's avatar marko

branches/zip: rec_get_nth_field_offs_old(): Add UNIV_UNLIKELY hints

to assertion-like tests.
parent e906213f
...@@ -681,13 +681,13 @@ rec_get_nth_field_offs_old( ...@@ -681,13 +681,13 @@ rec_get_nth_field_offs_old(
ut_ad(rec && len); ut_ad(rec && len);
ut_ad(n < rec_get_n_fields_old(rec)); ut_ad(n < rec_get_n_fields_old(rec));
if (n > REC_MAX_N_FIELDS) { if (UNIV_UNLIKELY(n > REC_MAX_N_FIELDS)) {
fprintf(stderr, "Error: trying to access field %lu in rec\n", fprintf(stderr, "Error: trying to access field %lu in rec\n",
(ulong) n); (ulong) n);
ut_error; ut_error;
} }
if (rec == NULL) { if (UNIV_UNLIKELY(rec == NULL)) {
fputs("Error: rec is NULL pointer\n", stderr); fputs("Error: rec is NULL pointer\n", stderr);
ut_error; ut_error;
} }
......
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