aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/src/kdrive.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-16 20:45:15 +0100
committerMarc Haesen <marc@hc-consult.be>2011-12-16 20:45:15 +0100
commit47913e82955ec8e2b1ba4d4b145497dede9163b5 (patch)
treed23c322caf26864270171d54eb2805cee2721e4d /xorg-server/hw/kdrive/src/kdrive.c
parent53d28537755790ee4625dc16f560cad5aa93f56b (diff)
downloadvcxsrv-47913e82955ec8e2b1ba4d4b145497dede9163b5.tar.gz
vcxsrv-47913e82955ec8e2b1ba4d4b145497dede9163b5.tar.bz2
vcxsrv-47913e82955ec8e2b1ba4d4b145497dede9163b5.zip
xserver git update 16 dec 2011
Diffstat (limited to 'xorg-server/hw/kdrive/src/kdrive.c')
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c
index 8dd039e1d..f6cc351cd 100644
--- a/xorg-server/hw/kdrive/src/kdrive.c
+++ b/xorg-server/hw/kdrive/src/kdrive.c
@@ -113,19 +113,14 @@ KdDisableScreen (ScreenPtr pScreen)
}
static void
-KdDoSwitchCmd (char *reason)
+KdDoSwitchCmd (const char *reason)
{
if (kdSwitchCmd)
{
- char *command = malloc(strlen (kdSwitchCmd) +
- 1 +
- strlen (reason) +
- 1);
- if (!command)
+ char *command;
+
+ if (asprintf(&command, "%s %s", kdSwitchCmd, reason) == -1)
return;
- strcpy (command, kdSwitchCmd);
- strcat (command, " ");
- strcat (command, reason);
system (command);
free(command);
}
@@ -258,7 +253,7 @@ Bool kdDumbDriver;
Bool kdSoftCursor;
char *
-KdParseFindNext (char *cur, char *delim, char *save, char *last)
+KdParseFindNext (char *cur, const char *delim, char *save, char *last)
{
while (*cur && !strchr (delim, *cur))
{