aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/kdrive')
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.c15
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.h8
2 files changed, 6 insertions, 17 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))
{
diff --git a/xorg-server/hw/kdrive/src/kdrive.h b/xorg-server/hw/kdrive/src/kdrive.h
index 9ac5a19d7..cda965d84 100644
--- a/xorg-server/hw/kdrive/src/kdrive.h
+++ b/xorg-server/hw/kdrive/src/kdrive.h
@@ -424,7 +424,7 @@ KdKeyboardInfo *
KdParseKeyboard (char *arg);
char *
-KdParseFindNext (char *cur, char *delim, char *save, char *last);
+KdParseFindNext (char *cur, const char *delim, char *save, char *last);
void
KdParseRgba (char *rgba);
@@ -503,12 +503,6 @@ KdInitInput(void);
void
KdCloseInput(void);
-void
-KdAddPointerDriver(KdPointerDriver *);
-
-void
-KdAddKeyboardDriver(KdKeyboardDriver *);
-
Bool
KdRegisterFd (int fd, void (*read) (int fd, void *closure), void *closure);