aboutsummaryrefslogtreecommitdiff
path: root/miscutils/man.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-08-05 14:15:19 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-08-05 14:15:19 +0000
commite2a09de415bbb6b007c21f86ab0722af05742dc2 (patch)
tree0f6f6f4068ef7cdc9c16aceef507239b84ab2e98 /miscutils/man.c
parent22b0bd85fddf07eb53a1edf53472eb8b8aa51cbd (diff)
downloadbusybox-e2a09de415bbb6b007c21f86ab0722af05742dc2.tar.gz
man: yet another fixlet to "manpage link" code
Diffstat (limited to 'miscutils/man.c')
-rw-r--r--miscutils/man.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/miscutils/man.c b/miscutils/man.c
index a2f6e3ba5..ebed207d2 100644
--- a/miscutils/man.c
+++ b/miscutils/man.c
@@ -49,9 +49,10 @@ static int run_pipe(const char *unpacker, const char *pager, char *man_filename,
}
if (man) { /* man page, not cat page */
- /* Test whether the man page is not a link to another one. */
+ /* Is this a link to another manpage? */
/* The link has the following on the first line: */
/* ".so another_man_page" */
+
struct stat sb;
char *line;
char *linkname, *p;
@@ -73,7 +74,7 @@ static int run_pipe(const char *unpacker, const char *pager, char *man_filename,
* ".so man7/path_resolution.7\n<junk>"
*/
*strchrnul(line, '\n') = '\0';
- linkname = p = skip_whitespace(&line[4]);
+ linkname = skip_whitespace(&line[4]);
/* If link has no slashes, we just replace man page name.
* If link has slashes (however many), we go back *once*.