summaryrefslogtreecommitdiffstats
path: root/libblkid/src
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-08-24 22:32:18 +0200
committerEthan Yonker <dees_troy@teamw.in>2016-08-24 22:32:18 +0200
commit34ae483e025c5b5c3293d6b6e78a623d40987fe8 (patch)
tree9995af67d6f045375ff6d2ca147bbaf1adea4ebc /libblkid/src
parentminui: Fix gr_set_font() build issue on cm-13.0 tree. (diff)
parentmerge in nyc-release history after reset to nyc-dev (diff)
downloadandroid_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar.gz
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar.bz2
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar.lz
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar.xz
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar.zst
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.zip
Diffstat (limited to '')
-rw-r--r--libblkid/src/probe.c3
-rw-r--r--libblkid/src/tag.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
index b2e7435aa..d476b7a23 100644
--- a/libblkid/src/probe.c
+++ b/libblkid/src/probe.c
@@ -1254,8 +1254,7 @@ done:
/* same sa blkid_probe_get_buffer() but works with 512-sectors */
unsigned char *blkid_probe_get_sector(blkid_probe pr, unsigned int sector)
{
- return pr ? blkid_probe_get_buffer(pr,
- ((blkid_loff_t) sector) << 9, 0x200) : NULL;
+ return blkid_probe_get_buffer(pr, ((blkid_loff_t) sector) << 9, 0x200);
}
struct blkid_prval *blkid_probe_assign_value(
diff --git a/libblkid/src/tag.c b/libblkid/src/tag.c
index a59c0e63a..6fcaa7e5e 100644
--- a/libblkid/src/tag.c
+++ b/libblkid/src/tag.c
@@ -155,7 +155,7 @@ int blkid_set_tag(blkid_dev dev, const char *name,
/* Existing tag not present, add to device */
if (!(t = blkid_new_tag()))
goto errout;
- t->bit_name = name ? strdup(name) : NULL;
+ t->bit_name = strdup(name);
t->bit_val = val;
t->bit_dev = dev;
@@ -170,7 +170,7 @@ int blkid_set_tag(blkid_dev dev, const char *name,
goto errout;
DBG(TAG, ul_debug(" creating new cache tag head %s", name));
- head->bit_name = name ? strdup(name) : NULL;
+ head->bit_name = strdup(name);
if (!head->bit_name)
goto errout;
list_add_tail(&head->bit_tags,