[nas] [patch] remove exported NoopDDA function
Stefan Huehner
stefan at huehner.org
Wed Aug 30 06:23:23 MDT 2006
Hi,
there is a empty NoopDDA function in dixutils.c which is exported and
listed in dix.h but only used in one place: resource.c . This patch
moves this functions to resource.c and modifies the parameters/return
value to match the expected values there.
Please check and consider applying.
Regards,
Stefan
-------------- next part --------------
Index: server/include/dix.h
===================================================================
--- server/include/dix.h (revision 225)
+++ server/include/dix.h (working copy)
@@ -84,6 +84,4 @@
extern int currentMaxClients;
extern long *checkForInput[2];
-extern void NoopDDA();
-
#endif /* DIX_H */
Index: server/dia/dixutils.c
===================================================================
--- server/dia/dixutils.c (revision 225)
+++ server/dia/dixutils.c (working copy)
@@ -54,16 +54,6 @@
extern void IgnoreClient(), AttendClient();
-/* No-op Don't Do Anything : sometimes we need to be able to call a procedure
- * that doesn't do anything. For example, on screen with only static
- * colormaps, if someone calls install colormap, it's easier to have a dummy
- * procedure to call than to check if there's a procedure
- */
-void
-NoopDDA()
-{
-}
-
/*
* A general work queue. Perform some task before the server
* sleeps for input.
Index: server/dia/resource.c
===================================================================
--- server/dia/resource.c (revision 225)
+++ server/dia/resource.c (working copy)
@@ -110,6 +110,7 @@
static void RebuildTable(int client);
typedef int (*DeleteType) ();
+static int DeleteFuncNoop(void) { return 0; }; /* do nothing delete function */
static DeleteType *DeleteFuncs = (DeleteType *) NULL;
@@ -166,7 +167,7 @@
sizeof(DeleteType));
if (!DeleteFuncs)
return FALSE;
- DeleteFuncs[RT_NONE & TypeAuMask] = (int (*)()) NoopDDA;
+ DeleteFuncs[RT_NONE & TypeAuMask] = DeleteFuncNoop;
}
clientTable[i = client->index].resources =
(ResourcePtr *) xalloc(INITBUCKETS * sizeof(ResourcePtr));
More information about the Nas
mailing list