diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-04 17:00:46 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-11 19:04:23 +0700 |
commit | dd45b7d74696cd4fe9545852640a3c2e66a808fd (patch) | |
tree | 3c44e2da200e44907a7e22dbfcf2f7e3707f3a0f /hw/kdrive | |
parent | 16158366954d945db6263f6de505fc02ee03c6cd (diff) |
kdrive: Get rid of xstrdup when argument is definitely non-NULL
ditto for Kdrive
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'hw/kdrive')
-rw-r--r-- | hw/kdrive/src/kinput.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 402475884..80a1458b1 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -919,7 +919,7 @@ KdAddConfigKeyboard (char *keyboard) if (!new) return BadAlloc; - new->line = xstrdup(keyboard); + new->line = strdup(keyboard); new->next = NULL; for (prev = &kdConfigKeyboards; *prev; prev = &(*prev)->next); @@ -987,7 +987,7 @@ KdAddConfigPointer (char *pointer) if (!new) return BadAlloc; - new->line = xstrdup(pointer); + new->line = strdup(pointer); new->next = NULL; for (prev = &kdConfigPointers; *prev; prev = &(*prev)->next); @@ -1067,11 +1067,11 @@ KdGetOptions (InputOption **options, char *string) newopt->key = (char *)malloc(tam_key); strncpy(newopt->key, string, tam_key); newopt->key[tam_key] = '\0'; - newopt->value = xstrdup(strchr(string, '=') + 1); + newopt->value = strdup(strchr(string, '=') + 1); } else { - newopt->key = xstrdup(string); + newopt->key = strdup(string); newopt->value = NULL; } newopt->next = NULL; @@ -1147,7 +1147,7 @@ KdParseKeyboard (char *arg) if (strcmp (save, "auto") == 0) ki->driverPrivate = NULL; else - ki->driverPrivate = xstrdup(save); + ki->driverPrivate = strdup(save); if (delim != ',') { @@ -1243,7 +1243,7 @@ KdParsePointer (char *arg) if (strcmp(save, "auto") == 0) pi->driverPrivate = NULL; else - pi->driverPrivate = xstrdup(save); + pi->driverPrivate = strdup(save); if (delim != ',') { |