diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2012-01-03 18:51:58 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2012-01-03 18:51:58 +0000 |
| commit | b3608ae18f1e5598bed81d0a10dd585a5080c40d (patch) | |
| tree | b751618c7a82d9c00cab91ea9f611585dbf14d84 /games | |
| parent | 69ee3e2f52eb8cba6e103cd1de3f91a7ffe1ddc7 (diff) | |
Notes
Diffstat (limited to 'games')
| -rw-r--r-- | games/fortune/fortune/fortune.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c index e93b0e721da9..de85d09d584a 100644 --- a/games/fortune/fortune/fortune.c +++ b/games/fortune/fortune/fortune.c @@ -683,7 +683,7 @@ all_forts(FILEDESC *fp, char *offensive) obscene->fd = fd; obscene->inf = NULL; obscene->path = offensive; - if ((sp = rindex(offensive, '/')) == NULL) + if ((sp = strrchr(offensive, '/')) == NULL) obscene->name = offensive; else obscene->name = ++sp; @@ -785,7 +785,7 @@ is_fortfile(const char *file, char **datp, char **posp, int check_for_offend) } } - if ((sp = rindex(file, '/')) == NULL) + if ((sp = strrchr(file, '/')) == NULL) sp = file; else sp++; @@ -797,7 +797,7 @@ is_fortfile(const char *file, char **datp, char **posp, int check_for_offend) DPRINTF(2, (stderr, "FALSE (check fortunes only)\n")); return (FALSE); } - if ((sp = rindex(sp, '.')) != NULL) { + if ((sp = strrchr(sp, '.')) != NULL) { sp++; for (i = 0; suflist[i] != NULL; i++) if (strcmp(sp, suflist[i]) == 0) { |
