summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaƩrcio de Sousa <lbsousajr@gmail.com>2014-05-09 09:09:16 -0300
committerKeith Packard <keithp@keithp.com>2014-05-12 14:14:28 -0700
commitfb24ac0a2c317099bdf7d1d8e4b7c443e3ee644f (patch)
tree03dd0274158de6ea1fa72d9fdd7fd60ee6ac1599
parentbbfed454b2a0fd5e2723524d145cb7c6e5aa9193 (diff)
xfree86: fix warnings after MatchSeat patch
This patch fixes some compile warnings that arise after commit 7070ebeebaca1b51f8a2801989120784a1c374ae (xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout") available at git repository git://people.freedesktop.org/~whot/xserver for-keith Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xfree86/common/xf86Config.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 5d1756785..2adef44c3 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -232,16 +232,17 @@ xf86ValidateFontPath(char *path)
return tmp_path;
}
-#define FIND_SUITABLE(pointertype, listhead, ptr) \
- { \
- pointertype l, p; \
- \
- for (l = listhead, p = NULL; !p && l; l = (pointertype) l->list.next) { \
- if (! l->match_seat || SeatId && xf86nameCompare(l->match_seat, SeatId) == 0) \
- p = l; \
- } \
- ptr = p; \
- }
+#define FIND_SUITABLE(pointertype, listhead, ptr) \
+ do { \
+ pointertype _l, _p; \
+ \
+ for (_l = (listhead), _p = NULL; !_p && _l; _l = (pointertype)_l->list.next) { \
+ if (!_l->match_seat || (SeatId && xf86nameCompare(_l->match_seat, SeatId) == 0)) \
+ _p = _l; \
+ } \
+ \
+ (ptr) = _p; \
+ } while(0)
/*
* use the datastructure that the parser provides and pick out the parts
@@ -2368,6 +2369,7 @@ xf86HandleConfigFile(Bool autoconfig)
const char *scanptr;
Bool singlecard = 0;
Bool implicit_layout = FALSE;
+ XF86ConfLayoutPtr layout;
if (!autoconfig) {
char *filename, *dirname, *sysdirname;
@@ -2443,8 +2445,6 @@ xf86HandleConfigFile(Bool autoconfig)
*/
/* First check if a layout section is present, and if it is valid. */
- XF86ConfLayoutPtr layout;
-
FIND_SUITABLE(XF86ConfLayoutPtr, xf86configptr->conf_layout_lst, layout);
if (layout == NULL || xf86ScreenName != NULL) {
XF86ConfScreenPtr screen;