diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-11-20 13:36:19 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-11-20 13:36:19 +0000 |
commit | fd3496a77ef30810799b632f4f492c58a60b5685 (patch) | |
tree | c92068374722ad02c252483be0d0790492f97f42 /sbin | |
parent | a707d8791299d52ed0698b5253c2c30e07549eb1 (diff) |
lseek botch repair; from tegge@idt.unit.no; netbsd pr#1768
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dumpfs/dumpfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 819df14150d..db55a462fd7 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -197,8 +197,8 @@ dumpfs(name) afs.fs_cssize - i : afs.fs_bsize; afs.fs_csp[j] = calloc(1, size); if (lseek(fd, - (off_t)(fsbtodb(&afs, (afs.fs_csaddr + j * afs.fs_frag)) * - dev_bsize), SEEK_SET) == (off_t)-1) + (off_t)((off_t)fsbtodb(&afs, (afs.fs_csaddr + j * afs.fs_frag)) * + (off_t)dev_bsize), SEEK_SET) == (off_t)-1) goto err; if (read(fd, afs.fs_csp[j], size) != size) goto err; @@ -239,7 +239,7 @@ dumpcg(name, fd, c) int i, j; printf("\ncg %d:\n", c); - if ((cur = lseek(fd, (off_t)(fsbtodb(&afs, cgtod(&afs, c)) * dev_bsize), + if ((cur = lseek(fd, (off_t)((off_t)fsbtodb(&afs, cgtod(&afs, c)) * (off_t)dev_bsize), SEEK_SET)) == (off_t)-1) return (1); if (read(fd, &acg, afs.fs_bsize) != afs.fs_bsize) { |