summaryrefslogtreecommitdiff
path: root/storeio
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1998-10-20 09:48:26 +0000
committerRoland McGrath <roland@gnu.org>1998-10-20 09:48:26 +0000
commitcaf7ac6e90416c95f67a381835980e3da3570eb0 (patch)
tree28077a76d06d42200c6a432d37d51e50b377d467 /storeio
parentfc40a731d23f893be2cb7699d7e078568d4c210c (diff)
Add braces to silence gcc warnings.
Diffstat (limited to 'storeio')
-rw-r--r--storeio/ChangeLog4
-rw-r--r--storeio/dev.c24
2 files changed, 17 insertions, 11 deletions
diff --git a/storeio/ChangeLog b/storeio/ChangeLog
index 98c0ef8f..0653d9fb 100644
--- a/storeio/ChangeLog
+++ b/storeio/ChangeLog
@@ -1,3 +1,7 @@
+1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
+
+ * dev.c (dev_buf_fill): Add braces to silence gcc warning.
+
1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
* storeio.c (main): Fix return type to int, and use return.
diff --git a/storeio/dev.c b/storeio/dev.c
index 9d9c375b..2f81f32a 100644
--- a/storeio/dev.c
+++ b/storeio/dev.c
@@ -1,6 +1,6 @@
/* store `device' I/O
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -70,14 +70,16 @@ dev_buf_fill (struct dev *dev, off_t offs)
size_t buf_len = store->block_size;
if (dev_buf_is_active (dev))
- if ((dev->buf_offs & ~block_mask) == (offs & ~block_mask))
- return 0; /* Correct block alredy in buffer. */
- else
- {
- err = dev_buf_discard (dev);
- if (err)
- return err;
- }
+ {
+ if ((dev->buf_offs & ~block_mask) == (offs & ~block_mask))
+ return 0; /* Correct block alredy in buffer. */
+ else
+ {
+ err = dev_buf_discard (dev);
+ if (err)
+ return err;
+ }
+ }
err = store_read (store, offs >> store->log2_block_size, store->block_size,
&buf, &buf_len);
@@ -171,7 +173,7 @@ dev_open (struct store_parsed *name, int flags, struct dev **dev)
}
/* Free DEV and any resources it consumes. */
-void
+void
dev_close (struct dev *dev)
{
if (dev->pager != NULL)
@@ -400,4 +402,4 @@ dev_read (struct dev *dev, off_t offs, size_t whole_amount,
vm_deallocate (mach_task_self (), (vm_address_t)*buf, whole_amount);
return err;
-}
+}