From 4f337a27603a3d2d4daeae8ae1cc4f02e08b02b6 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 4 Sep 2024 13:02:03 +0200 Subject: [PATCH] (!1359) dix: make CopyGrab() static This function is only called once in the same source file, no external callers at all. So, it doesn't need to be visible outside that file, and we can allow the compiler to do whatever fancy optimizations it might wanna do. Signed-off-by: Enrico Weigelt, metux IT consult --- dix/grabs.c | 4 +++- include/dixgrabs.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dix/grabs.c b/dix/grabs.c index 4e63e7203..9b947c5d6 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -193,6 +193,8 @@ UngrabAllDevices(Bool kill_client) ErrorF("End list of ungrabbed devices\n"); } +static Bool CopyGrab(GrabPtr dst, const GrabPtr src); + GrabPtr AllocGrab(const GrabPtr src) { @@ -269,7 +271,7 @@ FreeGrab(GrabPtr pGrab) free(pGrab); } -Bool +static Bool CopyGrab(GrabPtr dst, const GrabPtr src) { Mask *mdetails_mask = NULL; diff --git a/include/dixgrabs.h b/include/dixgrabs.h index dc1068fef..8e2b40dc4 100644 --- a/include/dixgrabs.h +++ b/include/dixgrabs.h @@ -33,7 +33,6 @@ extern void UngrabAllDevices(Bool kill_client); extern GrabPtr AllocGrab(const GrabPtr src); extern void FreeGrab(GrabPtr grab); -extern Bool CopyGrab(GrabPtr dst, const GrabPtr src); extern GrabPtr CreateGrab(int /* client */ , DeviceIntPtr /* device */ ,