diff options
author | Miles Bader <miles@gnu.org> | 1996-01-17 21:31:36 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-01-17 21:31:36 +0000 |
commit | 3c001eae44be712e49364c663e6193735b11e320 (patch) | |
tree | 2a9996f85187fdeed8bba37146603919c433008c /libstore | |
parent | 495d18121cbfd36227f268ec6dd26c75f5b288ed (diff) |
Formerly storeread.c.~3~
Diffstat (limited to 'libstore')
-rw-r--r-- | libstore/storeread.c | 10 |
1 files 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>", 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: |