diff options
author | ed <ed@FreeBSD.org> | 2012-01-03 18:51:58 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2012-01-03 18:51:58 +0000 |
commit | e7e5b53bf16ab3b35646f0580b36fa7d7afa9678 (patch) | |
tree | b751618c7a82d9c00cab91ea9f611585dbf14d84 /sbin/fsck_ffs | |
parent | d106f2fd7cf6be7617b1756d893b5b6fba5310f4 (diff) | |
download | FreeBSD-src-e7e5b53bf16ab3b35646f0580b36fa7d7afa9678.zip FreeBSD-src-e7e5b53bf16ab3b35646f0580b36fa7d7afa9678.tar.gz |
Replace index() and rindex() calls with strchr() and strrchr().
The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.
This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
Diffstat (limited to 'sbin/fsck_ffs')
-rw-r--r-- | sbin/fsck_ffs/pass2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/fsck_ffs/pass2.c b/sbin/fsck_ffs/pass2.c index 5959778..bd9bf97 100644 --- a/sbin/fsck_ffs/pass2.c +++ b/sbin/fsck_ffs/pass2.c @@ -613,7 +613,7 @@ fix_extraneous(struct inoinfo *inp, struct inodesc *idesc) printf(" (IGNORED)\n"); return (0); } - if ((cp = rindex(oldname, '/')) == NULL) { + if ((cp = strchr(oldname, '/')) == NULL) { printf(" (IGNORED)\n"); return (0); } |