diff options
author | Mark Kettenis <kettenis@gnu.org> | 1999-12-02 22:30:06 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 1999-12-02 22:30:06 +0000 |
commit | 1dc9ae4ed04d2ac33d8766697ef410e32a384bd3 (patch) | |
tree | 226f3876a5689cc14008c6909b1796be7f59eaee | |
parent | dbdcaa6fd6ec085f850bbb383d9f467cf824ca84 (diff) |
1999-12-02 Mark Kettenis <kettenis@gnu.org>
* io-read.c (diskfs_S_io_read): Add braces to silence gcc
warning.
-rw-r--r-- | libdiskfs/io-read.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/libdiskfs/io-read.c b/libdiskfs/io-read.c index 8f0b4a03..4c2adf31 100644 --- a/libdiskfs/io-read.c +++ b/libdiskfs/io-read.c @@ -71,21 +71,23 @@ diskfs_S_io_read (struct protid *cred, if (maxread == 0) err = 0; else if (S_ISLNK (np->dn_stat.st_mode)) - /* Read from a symlink. */ - if (! diskfs_read_symlink_hook) - err = EINVAL; - else - { - if (off == 0 && maxread == np->dn_stat.st_size) - err = (*diskfs_read_symlink_hook)(np, buf); - else - { - char *whole_link = alloca (np->dn_stat.st_size); - err = (*diskfs_read_symlink_hook)(np, whole_link); - if (! err) - memcpy (buf, whole_link + off, maxread); - } - } + { + /* Read from a symlink. */ + if (! diskfs_read_symlink_hook) + err = EINVAL; + else + { + if (off == 0 && maxread == np->dn_stat.st_size) + err = (*diskfs_read_symlink_hook)(np, buf); + else + { + char *whole_link = alloca (np->dn_stat.st_size); + err = (*diskfs_read_symlink_hook)(np, whole_link); + if (! err) + memcpy (buf, whole_link + off, maxread); + } + } + } else err = EINVAL; /* Use read below. */ |