diff options
author | Eric Sandeen <sandeen@redhat.com> | 2011-09-16 15:49:26 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-09-16 18:43:05 -0400 |
commit | 06e41ddea9aa7d01c9804d0da162a00efdc42d84 (patch) | |
tree | 757c208851dab9d9541e6c82e6fcafdb21ab2c5b | |
parent | 4ebbc0a310b8c2dc239a6b4a99e65331872dcf9a (diff) | |
download | e2fsprogs-06e41ddea9aa7d01c9804d0da162a00efdc42d84.tar.gz |
libe2p: reach unreachable code
The EOPNOTSUPP case is unreachable, being outside a set of:
#if
...
return;
#else
...
return;
#endif
Fix this up so that if neither HAVE_CHFLAGS nor
HAVE_EXT2_IOCTLS applies, we set EOPNOTSUPP.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | lib/e2p/setflags.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/e2p/setflags.c b/lib/e2p/setflags.c index 72cf4413..b203606f 100644 --- a/lib/e2p/setflags.c +++ b/lib/e2p/setflags.c @@ -55,7 +55,7 @@ int setflags (int fd, unsigned long flags) #endif return fchflags (fd, bsd_flags); -#else +#else /* ! HAVE_CHFLAGS */ #if HAVE_EXT2_IOCTLS struct stat buf; int f; @@ -68,8 +68,9 @@ int setflags (int fd, unsigned long flags) f = (int) flags; return ioctl(fd, EXT2_IOC_SETFLAGS, &f); -#endif /* HAVE_EXT2_IOCTLS */ -#endif +#else errno = EOPNOTSUPP; return -1; +#endif /* HAVE_EXT2_IOCTLS */ +#endif /* HAVE_CHFLAGS */ } |