summaryrefslogtreecommitdiff
path: root/package/serdisplib/patches/patch-src_serdisp_connect_usb_c
blob: c400ce875b66e095fb41fb628900268bb29a3baa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- serdisplib-1.97.8.orig/src/serdisp_connect_usb.c	2008-07-30 23:44:23.000000000 +0200
+++ serdisplib-1.97.8/src/serdisp_connect_usb.c	2009-05-31 16:28:11.000000000 +0200
@@ -220,7 +220,7 @@ serdisp_CONN_t* SDCONNusb_open(const cha
 #endif
 
   devname = (char*)sdcdev;
-  idx = index(devname, ':');
+  idx = strchr(devname, ':');
 
   if (serdisp_ptrdistance(idx, devname) >= 18) {
     sd_error(SERDISP_ENXIO, "%s(): invalid protocol (too long)", __func__);
@@ -230,7 +230,7 @@ serdisp_CONN_t* SDCONNusb_open(const cha
   sdtools_strncpy(protocol, devname, serdisp_ptrdistance(idx, devname));
   devname = (idx+1);
 
-  idx = index(devname, ':');
+  idx = strchr(devname, ':');
 
   if (idx) {
     if (serdisp_ptrdistance(idx, devname) >= 8) {
@@ -242,7 +242,7 @@ serdisp_CONN_t* SDCONNusb_open(const cha
     occurrence = (int)strtol(buffer, 0, 10);
   }
 
-  idx = index(devname, '/');
+  idx = strchr(devname, '/');
   if (idx && serdisp_ptrdistance(idx, devname) < 7) {
     sdtools_strncpy(buffer, devname, serdisp_ptrdistance(idx, devname));
     vendorID = (int)strtol(buffer, &endptr, 16);
@@ -254,7 +254,7 @@ serdisp_CONN_t* SDCONNusb_open(const cha
 
 
   if (vendorID != -1) {
-    idx = index(devname, '/');
+    idx = strchr(devname, '/');
     if (!idx) idx = devname + strlen(devname);
     if (serdisp_ptrdistance(idx, devname) < 7) {
       sdtools_strncpy(buffer, devname, serdisp_ptrdistance(idx, devname));