summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/vis/vis.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/vis/vis.c b/usr.bin/vis/vis.c
index 38aa9d70415..56c25a5b625 100644
--- a/usr.bin/vis/vis.c
+++ b/usr.bin/vis/vis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vis.c,v 1.20 2016/08/31 09:45:00 jsg Exp $ */
+/* $OpenBSD: vis.c,v 1.21 2020/08/03 01:08:37 deraadt Exp $ */
/* $NetBSD: vis.c,v 1.4 1994/12/20 16:13:03 jtc Exp $ */
/*-
@@ -130,10 +130,11 @@ void
process(FILE *fp)
{
static int col = 0;
- char *cp = "\0"+1; /* so *(cp-1) starts out != '\n' */
+ char *cp = "\0";
int c, rachar;
char buff[5];
+ cp++; /* so *(cp-1) starts out != '\n' */
c = getc(fp);
while (c != EOF) {
rachar = getc(fp);