diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-08-03 01:08:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-08-03 01:08:38 +0000 |
commit | 35f1aae7a6239a8702bf7fd77f0317121fbf6f2f (patch) | |
tree | a446c9aca096066598ea70b6b92a6944cbd6fc20 | |
parent | 7664df588d034be783cbbf4da4fac93c640c62e0 (diff) |
Split some code that gives clang10 heartburn
ok millert
-rw-r--r-- | usr.bin/vis/vis.c | 5 |
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); |