JUMBLE_SIZE macro in two files

Started by bt22nakamoritover 3 years ago6 messageshackers
Jump to latest
#1bt22nakamorit
bt22nakamorit@oss.nttdata.com

Hi,

queryjumble.c and queryjumble.h both define a macro JUMBLE_SIZE = 1024.
Since queryjumble.c includes queryjumble.h, the JUMBLE_SIZE definition
in queryjumble.c should be deleted.
Thoughts?

Tatsu

Attachments:

jumbsize_def.patchtext/x-diff; name=jumbsize_def.patchDownload+0-2
#2Julien Rouhaud
rjuju123@gmail.com
In reply to: bt22nakamorit (#1)
Re: JUMBLE_SIZE macro in two files

Hi,

On Tue, Oct 04, 2022 at 05:41:12PM +0900, bt22nakamorit wrote:

queryjumble.c and queryjumble.h both define a macro JUMBLE_SIZE = 1024.
Since queryjumble.c includes queryjumble.h, the JUMBLE_SIZE definition in
queryjumble.c should be deleted.

+1

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: bt22nakamorit (#1)
Re: JUMBLE_SIZE macro in two files

bt22nakamorit <bt22nakamorit@oss.nttdata.com> writes:

queryjumble.c and queryjumble.h both define a macro JUMBLE_SIZE = 1024.
Since queryjumble.c includes queryjumble.h, the JUMBLE_SIZE definition
in queryjumble.c should be deleted.

I would go more for taking it out of queryjumble.h. I see no
reason why that constant needs to be world-visible.

regards, tom lane

#4Michael Paquier
michael@paquier.xyz
In reply to: Tom Lane (#3)
Re: JUMBLE_SIZE macro in two files

On Tue, Oct 04, 2022 at 09:16:44AM -0400, Tom Lane wrote:

I would go more for taking it out of queryjumble.h. I see no
reason why that constant needs to be world-visible.

I was just looking at the patch before seeing your reply, and thought
the exact same thing. Perhaps you'd prefer apply that yourself?
--
Michael

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Paquier (#4)
Re: JUMBLE_SIZE macro in two files

Michael Paquier <michael@paquier.xyz> writes:

On Tue, Oct 04, 2022 at 09:16:44AM -0400, Tom Lane wrote:

I would go more for taking it out of queryjumble.h. I see no
reason why that constant needs to be world-visible.

I was just looking at the patch before seeing your reply, and thought
the exact same thing. Perhaps you'd prefer apply that yourself?

Nah, feel free.

regards, tom lane

#6Michael Paquier
michael@paquier.xyz
In reply to: Tom Lane (#5)
Re: JUMBLE_SIZE macro in two files

On Tue, Oct 04, 2022 at 11:17:09PM -0400, Tom Lane wrote:

Nah, feel free.

Okay, thanks. Applied, then.
--
Michael