os/connection: Make sure partial is initialized

Following the change in Xtrans 1.5 that allows for partial connections
to succeed, we need to make sure partial is properly initialized at
first, otherwise we rely on an uninitialized variable.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Suggested-by: Twaik Yont <twaikyont@gmail.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1783
(cherry picked from commit 080fb49eff)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1767>
This commit is contained in:
Olivier Fourdan 2025-01-15 09:40:34 +01:00
parent 6115eb1f65
commit e183b62e42

View file

@ -242,7 +242,7 @@ void
CreateWellKnownSockets(void)
{
int i;
int partial;
int partial = 0;
/* display is initialized to "0" by main(). It is then set to the display
* number if specified on the command line. */