summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2005-04-28 06:58:27 +0000
committerderaadt <deraadt@openbsd.org>2005-04-28 06:58:27 +0000
commit9f2a9f520c0ad4fe2431e0ede3b79bc7e94cdaeb (patch)
tree32b1462d92d1951c6736505f3723321cc4dd9a81
parentUse a special crafted string copy function to copy data from ustar (diff)
downloadwireguard-openbsd-9f2a9f520c0ad4fe2431e0ede3b79bc7e94cdaeb.tar.xz
wireguard-openbsd-9f2a9f520c0ad4fe2431e0ede3b79bc7e94cdaeb.zip
boring tweaks
-rw-r--r--usr.sbin/ztsscale/ztsscale.c7
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: