From 7b3f315a5d8b90dcb0db5512ed91fa700027cb7a Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 30 Oct 2012 08:08:23 +0100 Subject: fontconfig xserver mesa git update 30 oct 2012 fontconfig: bdaef0b80dc27f4ab7a9d9bcedcfd8b5724b3cfd xserver: 1ca096d5e07221025c4c4110528772b7d94f15ee mesa: 0a66ced8f822b0d5478b0cd6d72c1a6ad70647a2 --- xorg-server/hw/xwin/winprefs.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'xorg-server/hw/xwin/winprefs.c') diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c index faa97c351..dbc5b5228 100644 --- a/xorg-server/hw/xwin/winprefs.c +++ b/xorg-server/hw/xwin/winprefs.c @@ -57,9 +57,6 @@ extern int parse_file(FILE * fp); /* Currently in use command ID, incremented each new menu item created */ static int g_cmdid = STARTMENUID; -/* Defined in DIX */ -extern char *display; - /* Local function to handle comma-ified icon names */ static HICON LoadImageComma(char *fname, int sx, int sy, int flags); @@ -330,12 +327,12 @@ HandleCustomWM_COMMAND(unsigned long hwndIn, int command) case CMD_EXEC: if (fork() == 0) { struct rlimit rl; - unsigned long i; + int fd; /* Close any open descriptors except for STD* */ getrlimit(RLIMIT_NOFILE, &rl); - for (i = STDERR_FILENO + 1; i < rl.rlim_cur; i++) - close(i); + for (fd = STDERR_FILENO + 1; fd < rl.rlim_cur; fd++) + close(fd); /* Disassociate any TTYs */ setsid(); @@ -538,21 +535,21 @@ static HICON LoadImageComma(char *fname, int sx, int sy, int flags) { HICON hicon; - int index; + int i; char file[PATH_MAX + NAME_MAX + 2]; /* Some input error checking */ if (!fname || !fname[0]) return NULL; - index = 0; + i = 0; hicon = NULL; if (fname[0] == ',') { /* It's the XWIN.EXE resource they want */ - index = atoi(fname + 1); + i = atoi(fname + 1); hicon = LoadImage(g_hInstance, - MAKEINTRESOURCE(index), IMAGE_ICON, sx, sy, flags); + MAKEINTRESOURCE(i), IMAGE_ICON, sx, sy, flags); } else { file[0] = 0; @@ -569,8 +566,8 @@ LoadImageComma(char *fname, int sx, int sy, int flags) /* Specified as , */ *(strrchr(file, ',')) = 0; /* End string at comma */ - index = atoi(strrchr(fname, ',') + 1); - hicon = ExtractIcon(g_hInstance, file, index); + i = atoi(strrchr(fname, ',') + 1); + hicon = ExtractIcon(g_hInstance, file, i); } else { /* Just an .ico file... */ -- cgit v1.2.3