* Re: master 2f875ead59a: Avoid magic values in xfont_list
[not found] ` <20240720131308.EE4B6C3534C@vcs2.savannah.gnu.org>
@ 2024-07-20 13:22 ` Pip Cet
2024-07-20 13:50 ` Po Lu
0 siblings, 1 reply; 2+ messages in thread
From: Pip Cet @ 2024-07-20 13:22 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Emacs Devel
On Saturday, July 20th, 2024 at 13:13, Stefan Kangas <stefankangas@gmail.com> wrote:
> - char *r = name + len - 9; /* 9 == strlen (iso8859-1) */
> + char *r = name + len - sizeof "iso8859-1" - 1;
Should there be parentheses around
sizeof "iso8859-1" - 1
maybe? As it is the new code subtracts 11 from name + len, not 9, I believe.
Pip
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: master 2f875ead59a: Avoid magic values in xfont_list
2024-07-20 13:22 ` master 2f875ead59a: Avoid magic values in xfont_list Pip Cet
@ 2024-07-20 13:50 ` Po Lu
0 siblings, 0 replies; 2+ messages in thread
From: Po Lu @ 2024-07-20 13:50 UTC (permalink / raw)
To: Pip Cet; +Cc: Stefan Kangas, Emacs Devel
Pip Cet <pipcet@protonmail.com> writes:
> On Saturday, July 20th, 2024 at 13:13, Stefan Kangas <stefankangas@gmail.com> wrote:
>
>> - char *r = name + len - 9; /* 9 == strlen (iso8859-1) */
>> + char *r = name + len - sizeof "iso8859-1" - 1;
>
> Should there be parentheses around
>
> sizeof "iso8859-1" - 1
>
> maybe? As it is the new code subtracts 11 from name + len, not 9, I believe.
>
> Pip
Right, I just noticed (and fixed) this too. Could we each of us agree
to endeavor to reduce code churn rather than contribute to worsening it?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-20 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <172148118852.8008.11424776991367078206@vcs2.savannah.gnu.org>
[not found] ` <20240720131308.EE4B6C3534C@vcs2.savannah.gnu.org>
2024-07-20 13:22 ` master 2f875ead59a: Avoid magic values in xfont_list Pip Cet
2024-07-20 13:50 ` Po Lu
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).