Re: fix typos in comments

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: fix typos in comments
Дата
Msg-id 20150426164530.GC18789@awork2.anarazel.de
обсуждение исходный текст
Ответ на fix typos in comments  (Dmitriy Olshevskiy <olshevskiy87@bk.ru>)
Ответы Re: fix typos in comments  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

Man, whoever invented these an vs. a rules... But then this patch made
me lookup the rules ;)

On 2015-04-26 19:13:42 +0400, Dmitriy Olshevskiy wrote:

> diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c
> index 69ac077..1a43ab7 100644
> --- a/src/backend/optimizer/geqo/geqo_erx.c
> +++ b/src/backend/optimizer/geqo/geqo_erx.c
> @@ -138,7 +138,7 @@ gimme_edge_table(PlannerInfo *root, Gene *tour1, Gene *tour2,
>   *      registers edge from city1 to city2 in input edge table
>   *
>   *      no assumptions about directionality are made;
> - *      therefor it is up to the calling routine to
> + *      therefore it is up to the calling routine to
>   *      call gimme_edge twice to make a bi-directional edge
>   *      between city1 and city2;
>   *      uni-directional edges are possible as well (just call
> gimme_edge

I think both are actually legal? Yes therefore is more common, but
still.

I left this out.

> diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h
> index 82e811d..300b682 100644
> --- a/src/include/access/attnum.h
> +++ b/src/include/access/attnum.h
> @@ -29,14 +29,14 @@ typedef int16 AttrNumber;
>   */
>  /*
>   * AttributeNumberIsValid
> - *        True iff the attribute number is valid.
> + *        True if the attribute number is valid.
>   */
>  #define AttributeNumberIsValid(attributeNumber) \
>      ((bool) ((attributeNumber) != InvalidAttrNumber))
>  
>  /*
>   * AttrNumberIsForUserDefinedAttr
> - *        True iff the attribute number corresponds to an user defined attribute.
> + *        True if the attribute number corresponds to a user defined attribute.
>   */

Nope. Iff means "if and only if".

> diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
> index f4dc0db..b131412 100644
> --- a/src/include/storage/s_lock.h
> +++ b/src/include/storage/s_lock.h
> @@ -356,8 +356,8 @@ tas(volatile slock_t *lock)
>  /*
>   * Solaris has always run sparc processors in TSO (total store) mode, but
>   * linux didn't use to and the *BSDs still don't. So, be careful about
> - * acquire/release semantics. The CPU will treat superflous membars as NOPs,
> - * so it's just code space.
> + * acquire/release semantics. The CPU will treat superfluous membars as 
> + * NOPs, so it's just code space.
>   */
>  #define HAS_TEST_AND_SET

superflous, err superfluous, trailing space removed.

I've pushed the rest. Thanks!

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dmitriy Olshevskiy
Дата:
Сообщение: fix typos in comments
Следующее
От: Tom Lane
Дата:
Сообщение: Re: fix typos in comments