From 3c001eae44be712e49364c663e6193735b11e320 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 17 Jan 1996 21:31:36 +0000 Subject: Formerly storeread.c.~3~ --- libstore/storeread.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libstore/storeread.c b/libstore/storeread.c index 9a484096..0514aca7 100644 --- a/libstore/storeread.c +++ b/libstore/storeread.c @@ -19,7 +19,7 @@ main (int argc, char **argv) off_t addr = -1; int dumped = 0; - void dump (ssize_t addr, size_t len) + void dump (off_t addr, ssize_t len) { char buf[4096], *data = buf; size_t data_len = sizeof (buf); @@ -28,7 +28,7 @@ main (int argc, char **argv) &data, &data_len); if (err) error (5, err, store->name ? "%s" : "", store->name); - if (write (1, data, data_len) <= 0) + if (write (1, data, data_len) < 0) error (6, errno, "stdout"); if (data != buf) vm_deallocate (mach_task_self (), (vm_address_t)data, data_len); @@ -61,10 +61,10 @@ main (int argc, char **argv) break; case ARGP_KEY_END: - if (addr < 0) - dump (0, -1); - else if (! dumped) + if (addr >= 0) dump (addr, -1); + else if (! dumped) + dump (0, -1); break; case ARGP_KEY_NO_ARGS: -- cgit v1.2.3