]> sigrok.org Git - libsigrok.git/commitdiff
use strdup() instead of g_strdup()
authorBert Vermeulen <redacted>
Thu, 8 Apr 2010 14:44:13 +0000 (16:44 +0200)
committerBert Vermeulen <redacted>
Thu, 8 Apr 2010 14:50:27 +0000 (16:50 +0200)
hardware/common/serial.c

index cb7f11a76b3ad806fd2e7fe2794e96f3eafd21f9..0bed4368834a271712337561823795afac1bd59c 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <glob.h>
+#include <string.h>
 #include <glib.h>
 
 
@@ -46,7 +47,7 @@ GSList *list_serial_ports(void)
                if(!glob(serial_port_glob[i], 0, NULL, &g))
                {
                        for(j = 0; j < g.gl_pathc; j++)
-                               ports = g_slist_append(ports, g_strdup(g.gl_pathv[j]));
+                               ports = g_slist_append(ports, strdup(g.gl_pathv[j]));
                        globfree(&g);
                }
        }