kdrive: s/KdSaveString/strdup/g

This isn't even funny anymore.
This commit is contained in:
Adam Jackson 2009-04-03 11:06:50 -04:00
commit d2690375df
12 changed files with 23 additions and 36 deletions

View file

@ -77,7 +77,7 @@ BusInit (KdPointerInfo *pi)
close(fd);
if (pi->path)
xfree(pi->path);
pi->path = KdSaveString(BusNames[i]);
pi->path = strdup(BusNames[i]);
return Success;
}
}

View file

@ -209,7 +209,7 @@ EvdevPtrInit (KdPointerInfo *pi)
for (i = 0; i < NUM_DEFAULT_EVDEV; i++) {
fd = open (kdefaultEvdev[i], 2);
if (fd >= 0) {
pi->path = KdSaveString (kdefaultEvdev[i]);
pi->path = strdup (kdefaultEvdev[i]);
break;
}
}
@ -224,7 +224,7 @@ EvdevPtrInit (KdPointerInfo *pi)
close(fd);
pi->name = KdSaveString("Evdev mouse");
pi->name = strdup("Evdev mouse");
return Success;
}
@ -411,7 +411,7 @@ EvdevKbdInit (KdKeyboardInfo *ki)
close (fd);
ki->name = KdSaveString("Evdev keyboard");
ki->name = strdup("Evdev keyboard");
readMapping(ki);

View file

@ -737,10 +737,10 @@ LinuxKeyboardInit (KdKeyboardInfo *ki)
if (ki->path)
xfree(ki->path);
ki->path = KdSaveString("console");
ki->path = strdup("console");
if (ki->name)
xfree(ki->name);
ki->name = KdSaveString("Linux console keyboard");
ki->name = strdup("Linux console keyboard");
readKernelMapping (ki);

View file

@ -944,7 +944,7 @@ MouseInit (KdPointerInfo *pi)
for (i = 0; i < NUM_DEFAULT_MOUSE; i++) {
fd = open (kdefaultMouse[i], 2);
if (fd >= 0) {
pi->path = KdSaveString (kdefaultMouse[i]);
pi->path = strdup (kdefaultMouse[i]);
break;
}
}

View file

@ -100,9 +100,9 @@ MsInit (KdPointerInfo *pi)
return BadImplementation;
if (!pi->path || strcmp(pi->path, "auto"))
pi->path = KdSaveString("/dev/mouse");
pi->path = strdup("/dev/mouse");
if (!pi->name)
pi->name = KdSaveString("Microsoft protocol mouse");
pi->name = strdup("Microsoft protocol mouse");
return Success;
}

View file

@ -123,7 +123,7 @@ Ps2Init (KdPointerInfo *pi)
for (i = 0; i < NUM_PS2_NAMES; i++) {
ps2Port = open (Ps2Names[i], 0);
if (ps2Port >= 0) {
pi->path = KdSaveString (Ps2Names[i]);
pi->path = strdup (Ps2Names[i]);
break;
}
}
@ -137,7 +137,7 @@ Ps2Init (KdPointerInfo *pi)
close(ps2Port);
if (!pi->name)
pi->name = KdSaveString ("PS/2 Mouse");
pi->name = strdup ("PS/2 Mouse");
return Success;
}

View file

@ -169,7 +169,7 @@ TslibInit (KdPointerInfo *pi)
/* hacktastic */
private->phys_screen = 0;
pi->nAxes = 3;
pi->name = KdSaveString("Touchscreen");
pi->name = strdup("Touchscreen");
pi->inputClass = KD_TOUCHSCREEN;
return Success;