From a97e1fa1c1dc7804b2698668fce58aba32b2277b Mon Sep 17 00:00:00 2001 From: jkh Date: Tue, 9 Jul 1996 12:17:46 +0000 Subject: [PATCH] Cast lseek arguments appropriately. Submitted-By: "Frank ten Wolde" --- lib/libdisk/blocks.c | 10 +++++----- lib/libdisk/tst01.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/libdisk/blocks.c b/lib/libdisk/blocks.c index 85a9c44cf707..e3dca8a0eece 100644 --- a/lib/libdisk/blocks.c +++ b/lib/libdisk/blocks.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: blocks.c,v 1.2 1995/04/29 01:55:17 phk Exp $ + * $Id: blocks.c,v 1.3 1995/04/30 06:09:24 phk Exp $ * */ @@ -24,8 +24,8 @@ read_block(int fd, daddr_t block) foo = malloc(512); if (!foo) err(1,"malloc"); - if (-1 == lseek(fd,block * 512,SEEK_SET)) - err(1,"lseek"); + if (-1 == lseek(fd, (off_t)block * 512, SEEK_SET)) + err(1, "lseek"); if (512 != read(fd,foo, 512)) err(1,"read"); return foo; @@ -34,8 +34,8 @@ read_block(int fd, daddr_t block) void write_block(int fd, daddr_t block, void *foo) { - if (-1 == lseek(fd,block * 512,SEEK_SET)) - err(1,"lseek"); + if (-1 == lseek(fd, (off_t)block * 512, SEEK_SET)) + err(1, "lseek"); if (512 != write(fd,foo, 512)) err(1,"write"); } diff --git a/lib/libdisk/tst01.c b/lib/libdisk/tst01.c index 78da1010b332..b9911c4666c9 100644 --- a/lib/libdisk/tst01.c +++ b/lib/libdisk/tst01.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: tst01.c,v 1.16 1995/12/07 10:33:25 peter Exp $ + * $Id: tst01.c,v 1.17 1996/03/24 18:55:39 joerg Exp $ * */ @@ -77,8 +77,8 @@ scan_block(int fd, daddr_t block) { u_char foo[512]; - if (-1 == lseek(fd,block * 512,SEEK_SET)) - err(1,"lseek"); + if (-1 == lseek(fd, (off_t)block * 512, SEEK_SET)) + err(1, "lseek"); if (512 != read(fd,foo, 512)) return 1; return 0;