]> granicus.if.org Git - sysstat/commit
Replace index() call with strchr() call
authorTom Hebb <tch@fb.com>
Wed, 3 Jun 2020 18:57:21 +0000 (11:57 -0700)
committerTom Hebb <tch@fb.com>
Wed, 3 Jun 2020 18:57:21 +0000 (11:57 -0700)
commit46d6a6def297615cb65bc96c921def6777c51747
treef9f066230307647c4fa7b7ab6e957ea00da8ff57
parentb5fd09323bdbd36e34472ee448563f8a7fd34464
Replace index() call with strchr() call

According to glibc documentation[1], "index is another name for strchr;
they are exactly the same. New code should always use strchr." The use
of index() breaks compilation for Android targets, which use Bionic
instead of glibc and don't have index().

[1] https://www.gnu.org/software/libc/manual/html_node/Search-Functions.html#index-index
common.c
tests/12.0.1/common.c