From 0f24484f90e402ac16f64fc9aacb22fc8f6e75d1 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 28 Apr 2005 06:58:28 +0000 Subject: boring tweaks --- usr.sbin/ztsscale/ztsscale.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'usr.sbin') 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: -- cgit v1.2.3