package/zic: bump version to 2015e
[buildroot-gz.git] / package / mii-diag / 0001-strchr.patch
blobfcfeb3c73e0a8863d9aec9bd43b6b5b7ec50c351
1 Use the strrchr() function instead of the deprecated rindex()
2 function.
4 --- mii-diag-2.11.orig/mii-diag.c.orig 2008-06-25 11:08:52.000000000 +1000
5 +++ mii-diag-2.11.orig/mii-diag.c 2005-03-27 03:56:33.000000000 +1000
6 @@ -174,7 +174,7 @@
8 int c, errflag = 0;
9 char **spp, *ifname;
10 - char *progname = rindex(argv[0], '/') ? rindex(argv[0], '/')+1 : argv[0];
11 + char *progname = strrchr(argv[0], '/') ? strrchr(argv[0], '/')+1 : argv[0];
13 while ((c = getopt_long(argc, argv, shortopts, longopts, 0)) != EOF)
14 switch (c) {
15 @@ -310,7 +310,7 @@
16 str = endstr+1;
17 else {
18 fprintf(stderr, "Invalid driver parameter '%s'.\n", str);
19 - str = index(str, ',');
20 + str = strchr(str, ',');
22 } else if (endstr[0] == ',') {
23 data32[i] = newval;