Re: [hackers] [dwm][PATCH] cleanup, saves 7 LOC

From: Devin J. Pohly <djpohly_AT_gmail.com>
Date: Mon, 23 Dec 2019 08:53:48 -0600

On Mon, Dec 23, 2019 at 11:21:25AM +0100, Hiltjo Posthuma wrote:
> Hi,
>
> Regarding XFree():
> https://www.x.org/releases/current/doc/libX11/libX11/libX11.txt
>
> "A NULL pointer cannot be passed to this function."
>
> Where is it specified it can be NULL?

As of [0], the Xorg man page for XFree reads:

"If data is NULL, no operation is performed."

It was changed to reflect the behavior that Xorg has always had.
XFree() has been #defined to free() since their initial code import in
2003. However, it looks like other documentation was not updated, and
it's understandable if you want to keep the NULL checks.

[0]: https://gitlab.freedesktop.org/xorg/lib/libx11/commit/78851f6


> I think the current sendevent() code is more readable.

Okay. Thanks for taking a look at it.

>
> --
> Kind regards,
> Hiltjo
>

-- 
<><
Received on Mon Dec 23 2019 - 15:53:48 CET

This archive was generated by hypermail 2.3.0 : Mon Dec 23 2019 - 16:00:22 CET