Re: Code cleanup patch submission for extended_stats.c

From: Mark Dilger <hornschnorter(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: Code cleanup patch submission for extended_stats.c
Date: 2017-11-26 02:07:14
Message-ID: 9A68FB88-5F45-4848-9926-8586E2D777D1@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> On Nov 25, 2017, at 2:05 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Mark Dilger <hornschnorter(at)gmail(dot)com> writes:
>> It looks to me like Alvaro introduced this in the original version of the file which
>> was created in commit 7b504eb282ca2f5104b5c00b4f05a3ef6bb1385b. Grep'ing
>> through the code base, it seems the following would be more consistent with
>> how these initializations are handled elsewhere:
>
>> memset(nulls, 1, sizeof(nulls));
>> memset(replaces, 0, sizeof(replaces));
>> memset(values, 0, sizeof(values));
>
> +1. I'd be inclined to use "false" and "true" for the init values of
> the boolean arrays, too.

Done.

mark

Attachment Content-Type Size
0001_extended_stats_sizeof.patch.2 application/octet-stream 758 bytes
unknown_filename text/plain 2 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2017-11-26 02:20:26 Re: [HACKERS] PATCH: multivariate histograms and MCV lists
Previous Message Mark Dilger 2017-11-26 01:17:44 Re: [HACKERS] PATCH: multivariate histograms and MCV lists