• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/mii-diag/0001-strchr.patch
Peter KorsgaardPeter Korsgaard committed 298cd8eaa2103 Feb 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
Use the strrchr() function instead of the deprecated rindex()
2
function.
3
​
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 @@
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];
12
 
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, ',');
21
                }
22
            } else if (endstr[0] == ',') {
23
                data32[i] = newval;
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.