[gnome-control-center] wacom: Remove custom strdup function



commit ff3fd9631020f22386959e4f36783eafe49093b6
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 10 18:32:54 2012 +0000

    wacom: Remove custom strdup function

 panels/wacom/calibrator/main.c |    2 +-
 panels/wacom/calibrator/main.h |   12 ------------
 2 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/panels/wacom/calibrator/main.c b/panels/wacom/calibrator/main.c
index 85dc9e7..96d970e 100644
--- a/panels/wacom/calibrator/main.c
+++ b/panels/wacom/calibrator/main.c
@@ -126,7 +126,7 @@ int find_device(const char* pre_device, bool verbose, bool list_devices,
                     /* a calibratable device (has 2 axis valuators) */
                     found++;
                     *device_id = list->id;
-                    *device_name = my_strdup(list->name);
+                    *device_name = g_strdup(list->name);
                     device_axys->x_min = ax[0].min_value;
                     device_axys->x_max = ax[0].max_value;
                     device_axys->y_min = ax[1].min_value;
diff --git a/panels/wacom/calibrator/main.h b/panels/wacom/calibrator/main.h
index fa21073..7819568 100644
--- a/panels/wacom/calibrator/main.h
+++ b/panels/wacom/calibrator/main.h
@@ -27,18 +27,6 @@
 #include "calibrator.h"
 
 
-/* strdup: non-ansi */
-char* my_strdup(const char* s);
-char* my_strdup(const char* s) {
-    size_t len = strlen(s) + 1;
-    void* p = malloc(len);
-
-    if (p == NULL)
-        return NULL;
-
-    return (char*) memcpy(p, s, len);
-}
-
 int find_device(const char*, bool, bool, XID*, const char**, XYinfo*);
 
 static void usage(char* cmd, unsigned thr_misclick);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]