Subject: Re: bug#56372: 29.0.50; [PATCH] Avoid BadMatch X11 error

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 04 Jul 2022 12:19:23 +0200

Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <[email-masked]> writes:

> That piece of code is already inside "if (dpyinfo)"

Indeed.  And aren't we testing for dpyinfo twice already in that code?

Unless I'm misreading, it's:

  /* If DPYINFO is null, this means we didn't open the display in the
     first place, so don't try to close it.  */
  if (dpyinfo)
    {
... no code here that sets dpyinfo ...
[...]
      if (dpyinfo->terminal == terminal_list
	  && !terminal_list->next_terminal)
	{
	  fprintf (stderr, "%s\n", error_msg);

	  if (!ioerror && dpyinfo)
	    {

That && dpyinfo seems redundant?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no