summaryrefslogtreecommitdiff
path: root/libstore
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 /libstore
parentfc40a731d23f893be2cb7699d7e078568d4c210c (diff)
Add braces to silence gcc warnings.
Diffstat (limited to 'libstore')
-rw-r--r--libstore/rdwr.c30
-rw-r--r--libstore/typed.c20
2 files changed, 27 insertions, 23 deletions
diff --git a/libstore/rdwr.c b/libstore/rdwr.c
index bb3f3079..4b3cf84f 100644
--- a/libstore/rdwr.c
+++ b/libstore/rdwr.c
@@ -1,6 +1,6 @@
/* Store I/O
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 96, 97, 98 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
This file is part of the GNU Hurd.
@@ -259,20 +259,22 @@ store_read (struct store *store,
/* Deallocate any amount of WHOLE_BUF we didn't use. */
if (whole_buf != *buf)
- if (err)
- vm_deallocate (mach_task_self (),
- (vm_address_t)whole_buf, whole_buf_len);
- else
- {
- vm_size_t unused = whole_buf_len - round_page (*len);
- if (unused)
- vm_deallocate (mach_task_self (),
- (vm_address_t)whole_buf + whole_buf_len - unused,
- unused);
- *buf = whole_buf;
- }
+ {
+ if (err)
+ vm_deallocate (mach_task_self (),
+ (vm_address_t)whole_buf, whole_buf_len);
+ else
+ {
+ vm_size_t unused = whole_buf_len - round_page (*len);
+ if (unused)
+ vm_deallocate (mach_task_self (),
+ (vm_address_t)whole_buf + whole_buf_len
+ - unused,
+ unused);
+ *buf = whole_buf;
+ }
+ }
return err;
}
}
-
diff --git a/libstore/typed.c b/libstore/typed.c
index 09b92f8d..05083eea 100644
--- a/libstore/typed.c
+++ b/libstore/typed.c
@@ -1,6 +1,6 @@
/* Support for opening `typed' stores
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -55,13 +55,15 @@ store_typed_open (const char *name, int flags,
break;
if (! *cl)
- /* No class with the given name found. */
- if (*clname_end)
- /* NAME really should be a class name, which doesn't exist. */
- return EINVAL;
- else
- /* Try opening NAME by querying it as a file instead. */
- return store_open (name, flags, classes, store);
+ {
+ /* No class with the given name found. */
+ if (*clname_end)
+ /* NAME really should be a class name, which doesn't exist. */
+ return EINVAL;
+ else
+ /* Try opening NAME by querying it as a file instead. */
+ return store_open (name, flags, classes, store);
+ }
if (! (*cl)->open)
/* CL cannot be opened. */
@@ -75,7 +77,7 @@ store_typed_open (const char *name, int flags,
/* The class-specific portion of the name is empty, so make it *really*
empty. */
clname_end = 0;
-
+
return (*(*cl)->open) (clname_end, flags, classes, store);
}