diff options
author | 2016-02-03 15:47:27 +0000 | |
---|---|---|
committer | 2016-02-03 15:47:27 +0000 | |
commit | 4267aefcff0652cbbd925a66e82d2ef2fd3e7c49 (patch) | |
tree | 8614b7955e854c54afdbb35a841fcc5ee435273a | |
parent | When accessing the scsi link of a scsi disk, use a variable "sc_link" (diff) | |
download | wireguard-openbsd-4267aefcff0652cbbd925a66e82d2ef2fd3e7c49.tar.xz wireguard-openbsd-4267aefcff0652cbbd925a66e82d2ef2fd3e7c49.zip |
Rename a local var so that we can call the global message buffer msg.
ok nicm, tb
-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; } |