]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
[COVERITY] Allow blkid_dev_has_tag to check if a tag exists when value==NULL
authorTheodore Ts'o <tytso@mit.edu>
Sun, 18 Mar 2007 15:21:44 +0000 (11:21 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 18 Mar 2007 15:21:44 +0000 (11:21 -0400)
commitd90be5b1437b839e5f1afcee7073798d833e4534
treef0b09887a563d4129b943ca3bb477dda6db0db16
parentd2b2a488f996871e6e40789a7890afc2f59730db
[COVERITY] Allow blkid_dev_has_tag to check if a tag exists when value==NULL

blkid_dev_has_tag() will immediately return -1 (an error if value is
NULL.  Thus at the test later on value cannot be NULL. There are two
possible ways to go about fixing this. The first would be to remove the
first NULL check for value.  The second one would be to remove the
second check (and the deadcode).

I chose the second path because the functionality added is something
which a programmer could reasonably expect given the function name, and
it is highly unlikely any existing code is depending on the fact that
blkid_dev_has_tag() will return an error if value is NULL.

Coverity ID: 3: Deadcode

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/ChangeLog
lib/blkid/tag.c