diff options
author | Roland McGrath <roland@gnu.org> | 1998-10-20 09:48:26 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1998-10-20 09:48:26 +0000 |
commit | caf7ac6e90416c95f67a381835980e3da3570eb0 (patch) | |
tree | 28077a76d06d42200c6a432d37d51e50b377d467 /sutils | |
parent | fc40a731d23f893be2cb7699d7e078568d4c210c (diff) |
Add braces to silence gcc warnings.
Diffstat (limited to 'sutils')
-rw-r--r-- | sutils/ChangeLog | 5 | ||||
-rw-r--r-- | sutils/fstab.c | 28 |
2 files changed, 21 insertions, 12 deletions
diff --git a/sutils/ChangeLog b/sutils/ChangeLog index bbbe1982..4fafd389 100644 --- a/sutils/ChangeLog +++ b/sutils/ChangeLog @@ -1,3 +1,8 @@ +1998-10-20 Roland McGrath <roland@baalperazim.frob.com> + + * fstab.c (fstab_add_mntent): Add braces to silence gcc warning. + (fs_readonly): Likewise. + 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * swapon.c (main): Fix return type to int, and use return. diff --git a/sutils/fstab.c b/sutils/fstab.c index 6c756922..f46c2886 100644 --- a/sutils/fstab.c +++ b/sutils/fstab.c @@ -1,6 +1,6 @@ /* Fstab filesystem frobbing - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -330,10 +330,12 @@ fs_readonly (struct fs *fs, int *readonly) err = fs_fsys (fs, &fsys); if (! err) - if (fsys == MACH_PORT_NULL) - fs->readonly = 1; - else - err = fsys_get_readonly (fsys, &fs->readonly); + { + if (fsys == MACH_PORT_NULL) + fs->readonly = 1; + else + err = fsys_get_readonly (fsys, &fs->readonly); + } } if (!err && readonly) @@ -453,7 +455,7 @@ fstab_add_mntent (struct fstab *fstab, struct mntent *mntent, fs = mounted_fs; mounted_fs = 0; } - + if (! fs) /* No old entry, make a new one. */ { @@ -474,15 +476,17 @@ fstab_add_mntent (struct fstab *fstab, struct mntent *mntent, err = fs_set_mntent (fs, mntent); if (new) - if (! err) - _fstab_add (fstab, fs); - else if (fs) - free (fs); + { + if (! err) + _fstab_add (fstab, fs); + else if (fs) + free (fs); + } if (!err && mounted_fs) /* Get rid of the conflicting entry MOUNTED_FS. */ fs_free (mounted_fs); - + if (!err && result) *result = fs; @@ -537,7 +541,7 @@ fstab_merge (struct fstab *dst, struct fstab *src) if (old_fs) fs_free (old_fs); } - + /* Now that we know there are no conflicts, steal all SRC's entries and cons them onto DST. */ for (fs = src->entries; fs; fs = fs->next) |