xserver-multidpi/dix
Alan Coopersmith 50b1097643 Constify the reason string throughout the authorization check framework
Almost all of the places the string is assigned point to a literal
string constant, so use const char * for those, and const char **
for function calls that return it via an argument.   Fortunately
the top level function, ClientAuthorized, which returns the string
as its return value is called from only one place, ProcEstablishConnection.

ProcEstablishConnection stores either that return value or a string literal
in char *reason.  It only uses reason as an argument to SendConnSetup.
SendConnSetup passes the reason argument to strlen & WriteToClient,
both of which already have const qualifiers on their args.
Thus added const to the reason variable in ProcEstablishConnection
and the reason argument to SendConnSetup.

Fixes gcc warnings:
dispatch.c: In function 'ProcEstablishConnection':
dispatch.c:3711:9: warning: assignment discards qualifiers from pointer target type
auth.c: In function 'CheckAuthorization':
auth.c:218:14: warning: assignment discards qualifiers from pointer target type
auth.c:220:20: warning: assignment discards qualifiers from pointer target type
connection.c: In function 'ClientAuthorized':
connection.c:683:3: warning: return discards qualifiers from pointer target type
mitauth.c: In function 'MitCheckCookie':
mitauth.c:88:13: warning: assignment discards qualifiers from pointer target type
xdmauth.c:259:14: warning: assignment discards qualifiers from pointer target type
xdmauth.c:270:14: warning: assignment discards qualifiers from pointer target type
xdmauth.c:277:11: warning: assignment discards qualifiers from pointer target type
xdmauth.c:293:15: warning: assignment discards qualifiers from pointer target type
xdmauth.c:313:14: warning: assignment discards qualifiers from pointer target type
xdmauth.c:322:11: warning: assignment discards qualifiers from pointer target type
rpcauth.c: In function 'SecureRPCCheck':
rpcauth.c:136:10: warning: assignment discards qualifiers from pointer target type

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12 17:03:10 -08:00
..
.gitignore dix and os: gitignore dix.O and os.O 2011-09-23 17:14:47 -07:00
atom.c Convert some malloc + strncpy pairs into strndup calls 2011-11-23 12:15:05 -08:00
buildatoms XFree86 4.3.0.1 2003-11-14 16:49:22 +00:00
BuiltInAtoms R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
colormap.c Revert "Bug #6924: Restore the ABI for DrawableRec and ColormapRec to the state" 2011-09-19 22:31:21 -07:00
cursor.c CheckForEmptyMask does not need to declare int n twice 2011-12-12 17:03:08 -08:00
devices.c dix: switch the dev->deviceGrab.activeGrab from GrabRec to GrabPtr 2011-12-09 14:56:23 +10:00
dispatch.c Constify the reason string throughout the authorization check framework 2011-12-12 17:03:10 -08:00
dispatch.h xserver: delete pervasively use of DISPATCH_PROC 2010-09-28 16:45:05 +03:00
dixfonts.c dixfonts: Don't overwrite local c variable until new_closure is safely initialized. 2011-10-04 19:43:52 -07:00
dixutils.c dix: avoid calling deleted block and wakeup handlers 2011-06-30 16:38:29 +10:00
enterleave.c input: replace remaining GetPairedDevice() with GetMaster() 2011-11-09 13:26:47 +10:00
enterleave.h dix: call SetFocusOut and LeaveWindow when disabling a device. 2009-08-03 10:11:48 +10:00
eventconvert.c Use new FP1616/FP3232 conversion functions 2011-10-25 14:06:41 +10:00
events.c input: swap the server over to use the XI2mask struct 2011-12-09 14:56:23 +10:00
extension.c Save major/minor opcodes in ClientRec for RecordAReply 2011-12-01 15:11:20 +00:00
ffs.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
gc.c Un-export CreateScratchGC now that nothing external uses it. 2010-09-13 15:58:08 -07:00
getevents.c dix: Don't let a driver without a ProximityClassRec post events 2011-11-09 13:26:47 +10:00
globals.c dix: delete logo hack screen saver 2010-11-11 23:20:35 +02:00
glyphcurs.c Replace dixChangeGC with calls directly to the right variant. 2010-05-13 17:14:07 -07:00
grabs.c input: swap the server over to use the XI2mask struct 2011-12-09 14:56:23 +10:00
initatoms.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
inpututils.c dix: use BUG_WARN for input mask size issues 2011-12-09 14:56:23 +10:00
main.c Terminate the log with one last message. 2011-07-27 09:31:02 +10:00
Makefile.am Don't use empty source files 2011-06-23 05:28:31 -07:00
pixmap.c Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
privates.c Add fence sync driver interface 2010-12-06 19:15:26 -08:00
property.c DIX: Reset window properties when freeing them 2010-12-31 12:52:50 +00:00
protocol.txt Add DRI2 requests to protocol.txt 2009-08-28 23:29:05 -04:00
ptrveloc.c dix: move #if statement to stop compiler warning 2011-10-25 14:06:41 +10:00
region.c Delete RegionClipSpans() 2011-03-01 07:58:06 -05:00
registry.c constify strings in resource name registry 2011-12-12 17:03:08 -08:00
resource.c constify strings in resource name registry 2011-12-12 17:03:08 -08:00
selection.c Fix property and selection devPrivate allocation. 2010-09-10 11:44:12 -07:00
swaprep.c Cast char* buffers to swap functions 2011-09-21 17:14:44 -04:00
swapreq.c Use internal temp variable for swap macros 2011-09-21 17:12:04 -04:00
tables.c dix: remove proc tables initialization 2010-09-28 16:46:46 +03:00
window.c Fix non-Composite builds in PrintWindowTree 2011-07-15 15:44:06 +10:00
Xserver-dtrace.h.in Sun's copyrights now belong to Oracle 2010-12-07 11:10:35 -08:00
Xserver.d Sun's copyrights now belong to Oracle 2010-12-07 11:10:35 -08:00