diff options
author | Karel Zak | 2016-06-14 13:55:27 +0200 |
---|---|---|
committer | Karel Zak | 2016-06-14 14:39:16 +0200 |
commit | 7f787ced5d401ccd56a82bb2b1202f1ea7164783 (patch) | |
tree | 2156288adc10a43c9509f1378fe60597f994e02f /libblkid/src/superblocks | |
parent | libmount: don't check nonnull attributes for NULL [-Wnonnull-compare] (diff) | |
download | kernel-qcow2-util-linux-7f787ced5d401ccd56a82bb2b1202f1ea7164783.tar.gz kernel-qcow2-util-linux-7f787ced5d401ccd56a82bb2b1202f1ea7164783.tar.xz kernel-qcow2-util-linux-7f787ced5d401ccd56a82bb2b1202f1ea7164783.zip |
libblkid: don't check nonnull attributes for NULL [-Wnonnull-compare]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/superblocks')
-rw-r--r-- | libblkid/src/superblocks/superblocks.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c index 4aeebf32e..341cd8a6f 100644 --- a/libblkid/src/superblocks/superblocks.c +++ b/libblkid/src/superblocks/superblocks.c @@ -185,8 +185,6 @@ const struct blkid_chaindrv superblocks_drv = { */ int blkid_probe_enable_superblocks(blkid_probe pr, int enable) { - if (!pr) - return -1; pr->chains[BLKID_CHAIN_SUBLKS].enabled = enable; return 0; } @@ -203,9 +201,6 @@ int blkid_probe_enable_superblocks(blkid_probe pr, int enable) */ int blkid_probe_set_superblocks_flags(blkid_probe pr, int flags) { - if (!pr) - return -1; - pr->chains[BLKID_CHAIN_SUBLKS].flags = flags; return 0; } @@ -300,9 +295,6 @@ int blkid_known_fstype(const char *fstype) { size_t i; - if (!fstype) - return 0; - for (i = 0; i < ARRAY_SIZE(idinfos); i++) { const struct blkid_idinfo *id = idinfos[i]; if (strcmp(id->name, fstype) == 0) @@ -339,7 +331,7 @@ static int superblocks_probe(blkid_probe pr, struct blkid_chain *chn) size_t i; int rc = BLKID_PROBE_NONE; - if (!pr || chn->idx < -1) + if (chn->idx < -1) return -EINVAL; blkid_probe_chain_reset_values(pr, chn); |