From fa325e9b42b0bdfb48857d1958d9fb7ceac55151 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 10 Jan 2020 14:44:21 +0000 Subject: Trivial changes: whitespace and modes. Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross --- src/cmd/draw/cmapcube.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/draw/cmapcube.c') diff --git a/src/cmd/draw/cmapcube.c b/src/cmd/draw/cmapcube.c index 3d0e14e8..4d56322b 100644 --- a/src/cmd/draw/cmapcube.c +++ b/src/cmd/draw/cmapcube.c @@ -109,7 +109,7 @@ redraw(void) line3(v[0x36], v[0x32]); line3(v[0x32], v[0x3F]); line3(v[0x3F], v[0]); - + line3(v[0xF0], v[0xF3]); line3(v[0xF3], v[0xFF]); line3(v[0xFF], v[0xFC]); -- cgit v1.2.3 From 2cb85891ba58a83263ef30dc9799d1fda9fb71af Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 11 Jan 2020 06:02:08 -0500 Subject: cmapcube: don't crash on initdraw failure --- src/cmd/draw/cmapcube.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cmd/draw/cmapcube.c') diff --git a/src/cmd/draw/cmapcube.c b/src/cmd/draw/cmapcube.c index 4d56322b..fd234d60 100644 --- a/src/cmd/draw/cmapcube.c +++ b/src/cmd/draw/cmapcube.c @@ -185,7 +185,8 @@ void main(int argc, char **argv){ break; }ARGEND - initdraw(0,0,0); + if(initdraw(0,0,0) < 0) + sysfatal("initdraw: %r"); ncolor=256; for(i=0;i!=ncolor;i++) color[i] = allocimage(display, Rect(0, 0, 1, 1), CMAP8, 1, cmap2rgba(i)); -- cgit v1.2.3