From 93856053b7e0b4f1fdbe952c3c2e80d7a1bbe0b0 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 4 Sep 2024 13:02:03 +0200 Subject: [PATCH] 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 fc27f8612..34d6458a5 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -191,6 +191,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) { @@ -267,7 +269,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 */ ,