summaryrefslogtreecommitdiff
path: root/libdiskfs/fsys-options.c
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-08-24 11:09:05 +0200
committerJustus Winter <justus@gnupg.org>2017-08-24 23:22:24 +0200
commit59dacf77dc0aa25dfda3b192ec099e7310d543d2 (patch)
tree67b86043eeb4eeec0ecd74495eed7bf02c54a513 /libdiskfs/fsys-options.c
parenta3254ced93e2db103d7395c4d5a727260ae69894 (diff)
libdiskfs: Simplify type checks.
* libdiskfs/diskfs.h (diskfs_begin_using_control_port): Check port class. * libdiskfs/fsys-getfile.c (diskfs_S_fsys_getfile): Drop check. * libdiskfs/fsys-getroot.c (diskfs_S_fsys_getroot): Likewise. * libdiskfs/fsys-goaway.c (diskfs_S_fsys_goaway): Likewise. * libdiskfs/fsys-options.c (diskfs_S_fsys_{s,g}et_options): Likewise. * libdiskfs/fsys-syncfs.c (diskfs_S_fsys_syncfs): Likewise.
Diffstat (limited to 'libdiskfs/fsys-options.c')
-rw-r--r--libdiskfs/fsys-options.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libdiskfs/fsys-options.c b/libdiskfs/fsys-options.c
index b366d143..f676ed07 100644
--- a/libdiskfs/fsys-options.c
+++ b/libdiskfs/fsys-options.c
@@ -58,8 +58,7 @@ diskfs_S_fsys_set_options (struct diskfs_control *pt,
return error;
}
- if (!pt
- || pt->pi.class != diskfs_control_class)
+ if (!pt)
return EOPNOTSUPP;
if (do_children)
@@ -90,8 +89,7 @@ diskfs_S_fsys_get_options (struct diskfs_control *port,
size_t argz_len = 0;
error_t err;
- if (!port
- || port->pi.class != diskfs_control_class)
+ if (!port)
return EOPNOTSUPP;
err = argz_add (&argz, &argz_len, program_invocation_name);