diff options
Diffstat (limited to 'contrib/bloom/blutils.c')
-rw-r--r-- | contrib/bloom/blutils.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/bloom/blutils.c b/contrib/bloom/blutils.c index 3d44616adcf..e2063bac629 100644 --- a/contrib/bloom/blutils.c +++ b/contrib/bloom/blutils.c @@ -475,18 +475,18 @@ BloomInitMetapage(Relation index) bytea * bloptions(Datum reloptions, bool validate) { - relopt_value *options; - int numoptions; BloomOptions *rdopts; /* Parse the user-given reloptions */ - options = parseRelOptions(reloptions, validate, bl_relopt_kind, &numoptions); - rdopts = allocateReloptStruct(sizeof(BloomOptions), options, numoptions); - fillRelOptions((void *) rdopts, sizeof(BloomOptions), options, numoptions, - validate, bl_relopt_tab, lengthof(bl_relopt_tab)); + rdopts = (BloomOptions *) build_reloptions(reloptions, validate, + bl_relopt_kind, + sizeof(BloomOptions), + bl_relopt_tab, + lengthof(bl_relopt_tab)); /* Convert signature length from # of bits to # to words, rounding up */ - rdopts->bloomLength = (rdopts->bloomLength + SIGNWORDBITS - 1) / SIGNWORDBITS; + if (rdopts) + rdopts->bloomLength = (rdopts->bloomLength + SIGNWORDBITS - 1) / SIGNWORDBITS; return (bytea *) rdopts; } |