aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/src
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/kdrive/src')
-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 f5af57e82..78b0017a6 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);
}
@@ -260,7 +255,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 00f07df41..7289e30dd 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);