From 90e85992199469ca1191aadd3ab0222a158576be Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Mon, 6 Feb 2017 11:33:58 +0200 Subject: Fix typos in comments. Backpatch to all supported versions, where applicable, to make backpatching of future fixes go more smoothly. Josh Soref Discussion: https://www.postgresql.org/message-id/CACZqfqCf+5qRztLPgmmosr-B0Ye4srWzzw_mo4c_8_B_mtjmJQ@mail.gmail.com --- src/backend/utils/adt/tsrank.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/tsrank.c') diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c index d887a14d057..63510f58bdc 100644 --- a/src/backend/utils/adt/tsrank.c +++ b/src/backend/utils/adt/tsrank.c @@ -898,7 +898,7 @@ calc_rank_cd(const float4 *arrdata, TSVector txt, TSQuery query, int method) /* * if doc are big enough then ext.q may be equal to ext.p due to limit - * of posional information. In this case we approximate number of + * of positional information. In this case we approximate number of * noise word as half cover's length */ nNoise = (ext.q - ext.p) - (ext.end - ext.begin); @@ -907,7 +907,7 @@ calc_rank_cd(const float4 *arrdata, TSVector txt, TSQuery query, int method) Wdoc += Cpos / ((double) (1 + nNoise)); CurExtPos = ((double) (ext.q + ext.p)) / 2.0; - if (NExtent > 0 && CurExtPos > PrevExtPos /* prevent devision by + if (NExtent > 0 && CurExtPos > PrevExtPos /* prevent division by * zero in a case of multiple lexize */ ) SumDist += 1.0 / (CurExtPos - PrevExtPos); -- cgit v1.2.3