diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-04-28 06:58:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-04-28 06:58:28 +0000 |
commit | 0f24484f90e402ac16f64fc9aacb22fc8f6e75d1 (patch) | |
tree | d01286d23bf835afc1d1a37c89536130823557c0 /usr.sbin | |
parent | 0da6ff66698c9a150dd286ffcd699ed8c40650b7 (diff) |
boring tweaks
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ztsscale/ztsscale.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/ztsscale/ztsscale.c b/usr.sbin/ztsscale/ztsscale.c index 42a073bc440..cd07f65bf2e 100644 --- a/usr.sbin/ztsscale/ztsscale.c +++ b/usr.sbin/ztsscale/ztsscale.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ztsscale.c,v 1.6 2005/04/25 02:52:00 uwe Exp $ */ +/* $OpenBSD: ztsscale.c,v 1.7 2005/04/28 06:58:27 deraadt Exp $ */ /* * Copyright (c) 2005 Matthieu Herrb @@ -130,7 +130,7 @@ save_screen(void) warn("ioctl SMODE\n"); } mapaddr = (void *)mmap(0, WIDTH*HEIGHT*sizeof(short), - PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t)0); if (mapaddr == (void *)-1) err(2, "mmap"); save = (u_short *)malloc(WIDTH*HEIGHT*sizeof(u_short)); @@ -177,9 +177,8 @@ main(int argc, char *argv[]) usage(); fd = open("/dev/ttyC0", O_RDWR); - if (fd < 0) { + if (fd < 0) err(2, "open /dev/ttyC0"); - } save_screen(); again: |