xserver-multidpi/xkb
Alan Coopersmith d8eb9b5faa XkbFindSrvLedInfo: remove extraneous name-clashing sli variable
Variable is already defined outside the outer if statement, and
there's no need to redefine inside the if statement.

No point in setting sli before if (dev->kbdfeed->xkb_sli==NULL)
check - if check is true, we immediately set it, if check is false,
we immediately return without further reference or use of it.

The one thing we do with it inside the inner if statement is store
an allocation in it for a brief moment before writing to the final
destination, which is immediately returned to the caller.

In short, there's no benefit to the variable at all in this block,
it just gives the optimizer more code to figure out how to omit.

Fixes gcc warning:
xkbLEDs.c: In function 'XkbFindSrvLedInfo':
xkbLEDs.c:683:19: warning: declaration of 'sli' shadows a previous local
xkbLEDs.c:679:18: warning: shadowed declaration is here

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:11 -08:00
..
ddxBeep.c xkb: sed True -> TRUE and False -> FALSE 2010-02-02 10:03:30 +10:00
ddxCtrls.c Remove #define NEED_EVENTS and NEED_REPLIES 2008-12-12 11:43:32 +10:00
ddxKillSrv.c Remove #define NEED_EVENTS and NEED_REPLIES 2008-12-12 11:43:32 +10:00
ddxLEDs.c Remove #define NEED_EVENTS and NEED_REPLIES 2008-12-12 11:43:32 +10:00
ddxList.c Mark XKB char * as const to clean up gcc -Wwrite-strings warnings 2011-11-23 12:15:06 -08:00
ddxLoad.c Convert strncpy/strncat to strlcpy/strlcat 2011-11-23 12:15:05 -08:00
ddxPrivate.c Remove #define NEED_EVENTS and NEED_REPLIES 2008-12-12 11:43:32 +10:00
ddxVT.c Remove #define NEED_EVENTS and NEED_REPLIES 2008-12-12 11:43:32 +10:00
Makefile.am xkb: rename XkbFakeDeviceButton and XkbFakeDeviceMotion, move into xkbActions.c 2010-04-19 09:23:20 +10:00
maprules.c Mark XKB char * as const to clean up gcc -Wwrite-strings warnings 2011-11-23 12:15:06 -08:00
README.compiled R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
xkb.c xkb: add missing swaps for xkbGetDeviceInfoReply 2011-09-21 17:14:45 -04:00
xkb.h xkb: move XkbFilterEvents to xkbsrv.h 2009-07-30 08:43:14 +10:00
xkbAccessX.c Add #include "inpututils.h" to xkbAccessX.c for init_device_event 2011-10-03 08:54:09 +10:00
xkbActions.c input: replace remaining GetPairedDevice() with GetMaster() 2011-11-09 13:26:47 +10:00
XKBAlloc.c xkb: Release XKB component names when compiling keymap. 2011-03-16 15:21:41 +10:00
xkbDflts.h Static markup and dead code cull over xkb/. 2007-03-20 18:37:02 -04:00
xkbEvents.c Use internal temp variable for swap macros 2011-09-21 17:12:04 -04:00
xkbfmisc.c Mark XKB char * as const to clean up gcc -Wwrite-strings warnings 2011-11-23 12:15:06 -08:00
XKBGAlloc.c xkb: Introduce helper function to handle similar reallocations. 2011-04-04 09:55:04 +10:00
xkbgeom.h xkb: Introduce helper function to handle similar reallocations. 2011-04-04 09:55:04 +10:00
xkbInit.c Fix gcc -Wwrite-strings warnings in XkbGetRulesDflts 2011-11-23 12:15:07 -08:00
xkbLEDs.c XkbFindSrvLedInfo: remove extraneous name-clashing sli variable 2011-12-12 17:03:11 -08:00
XKBMAlloc.c Remove more superfluous if(p!=NULL) checks around free(p). 2010-11-11 08:29:54 +10:00
XKBMisc.c xkb: Replace a few manual bitflips with SetBit & friends. 2011-01-20 07:48:47 +10:00
xkbout.c Mark XKB char * as const to clean up gcc -Wwrite-strings warnings 2011-11-23 12:15:06 -08:00
xkbPrKeyEv.c input: don't use typecasts to access members of InternalEvent. 2009-09-22 11:15:32 +10:00
xkbSwap.c Use internal temp variable for swap macros 2011-09-21 17:12:04 -04:00
xkbtext.c Mark XKB char * as const to clean up gcc -Wwrite-strings warnings 2011-11-23 12:15:06 -08:00
xkbUtils.c xkb: Prevent leaking of XKB geometry information on copy. 2011-04-04 09:55:05 +10:00
XKM_file_format.txt xkb: Add XKM file format description. 2010-02-02 10:03:21 +10:00
xkmread.c XKB: Work around broken interps from old xkbcomp 2011-07-15 15:44:19 +10:00

The X server uses this directory to store the compiled version of the
current keymap and/or any scratch keymaps used by clients.  The X server
or some other tool might destroy or replace the files in this directory,
so it is not a safe place to store compiled keymaps for long periods of
time.  The default keymap for any server is usually stored in:
     X<num>-default.xkm
where <num> is the display number of the server in question, which makes
it possible for several servers *on the same host* to share the same 
directory.

Unless the X server is modified, sharing this directory between servers on
different hosts could cause problems.