diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/less/optfunc.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/less/optfunc.c b/usr.bin/less/optfunc.c index 074d0028b7e..97f7f7868e1 100644 --- a/usr.bin/less/optfunc.c +++ b/usr.bin/less/optfunc.c @@ -435,7 +435,7 @@ opt_x(int type, char *s) extern int tabstops[]; extern int ntabstops; extern int tabdefault; - char msg[60+(4*TABSTOP_MAX)]; + char tabs[60+(4*TABSTOP_MAX)]; int i; PARG p; @@ -460,20 +460,21 @@ opt_x(int type, char *s) tabdefault = tabstops[ntabstops-1] - tabstops[ntabstops-2]; break; case QUERY: - (void) strlcpy(msg, "Tab stops ", sizeof(msg)); + (void) strlcpy(tabs, "Tab stops ", sizeof(tabs)); if (ntabstops > 2) { for (i = 1; i < ntabstops; i++) { if (i > 1) - strlcat(msg, ",", sizeof(msg)); - (void) snprintf(msg+strlen(msg), - sizeof(msg)-strlen(msg), "%d", tabstops[i]); + strlcat(tabs, ",", sizeof(tabs)); + (void) snprintf(tabs+strlen(tabs), + sizeof(tabs)-strlen(tabs), + "%d", tabstops[i]); } - (void) snprintf(msg+strlen(msg), sizeof(msg)-strlen(msg), - " and then "); + (void) snprintf(tabs+strlen(tabs), + sizeof(tabs)-strlen(tabs), " and then "); } - (void) snprintf(msg+strlen(msg), sizeof(msg)-strlen(msg), + (void) snprintf(tabs+strlen(tabs), sizeof(tabs)-strlen(tabs), "every %d spaces", tabdefault); - p.p_string = msg; + p.p_string = tabs; error("%s", &p); break; } |