aboutsummaryrefslogtreecommitdiff
path: root/miscutils/man.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-03-14 20:33:00 +0000
committerRon Yorston <rmy@pobox.com>2015-03-14 20:33:00 +0000
commita4f58436b78fe59e57620c6e0301f213ee25f273 (patch)
tree8355f724926e605280af2d6f2b1ccc6b1bd02dee /miscutils/man.c
parentba0c36cfcf84efbac6f89e27238e04bb57e9cd45 (diff)
parent49acc1a7618a28d34381cbb7661d7c981fcb238f (diff)
downloadbusybox-w32-a4f58436b78fe59e57620c6e0301f213ee25f273.tar.gz
busybox-w32-a4f58436b78fe59e57620c6e0301f213ee25f273.tar.bz2
busybox-w32-a4f58436b78fe59e57620c6e0301f213ee25f273.zip
Merge branch 'busybox' into merge
Conflicts: coreutils/od_bloaty.c libbb/lineedit.c
Diffstat (limited to 'miscutils/man.c')
-rw-r--r--miscutils/man.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/man.c b/miscutils/man.c
index 3f389b435..4ce40b247 100644
--- a/miscutils/man.c
+++ b/miscutils/man.c
@@ -66,7 +66,7 @@ static int run_pipe(const char *pager, char *man_filename, int man, int level)
66 goto ordinary_manpage; 66 goto ordinary_manpage;
67 67
68 line = xmalloc_open_zipped_read_close(man_filename, NULL); 68 line = xmalloc_open_zipped_read_close(man_filename, NULL);
69 if (!line || strncmp(line, ".so ", 4) != 0) { 69 if (!line || !is_prefixed_with(line, ".so ")) {
70 free(line); 70 free(line);
71 goto ordinary_manpage; 71 goto ordinary_manpage;
72 } 72 }
@@ -232,7 +232,7 @@ int man_main(int argc UNUSED_PARAM, char **argv)
232 if (!token[1]) 232 if (!token[1])
233 continue; 233 continue;
234 if (strcmp("DEFINE", token[0]) == 0) { 234 if (strcmp("DEFINE", token[0]) == 0) {
235 if (strncmp("pager", token[1], 5) == 0) { 235 if (is_prefixed_with("pager", token[1])) {
236 pager = xstrdup(skip_whitespace(token[1]) + 5); 236 pager = xstrdup(skip_whitespace(token[1]) + 5);
237 } 237 }
238 } else 238 } else