[PATCH 7/8] config: Replace xstrdup with strdup in add_option()

Mikhail Gusarov dottedmag at dottedmag.net
Fri Jun 4 03:25:04 PDT 2010


All callers of add_option pass string literal as "key" argument
except one, where non-NULL condition is guarded by if().

Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
---
 config/config.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/config/config.c b/config/config.c
index d42a16a..d86f7c6 100644
--- a/config/config.c
+++ b/config/config.c
@@ -133,7 +133,7 @@ add_option(InputOption **options, const char *key, const char *value)
     *options = calloc(sizeof(**options), 1);
     if (!*options) /* Yeesh. */
         return;
-    (*options)->key = xstrdup(key);
+    (*options)->key = strdup(key);
     (*options)->value = strdup(value);
     (*options)->next = NULL;
 }
-- 
1.7.1



More information about the xorg-devel mailing list