Commit ccea3654 authored by Max Kellermann's avatar Max Kellermann

tag: added tag_is_defined()

tag_is_defined() checks whether there is any information in the tag object.
parent 15435b09
......@@ -110,6 +110,15 @@ tag_is_empty(const struct tag *tag)
}
/**
* Returns true if the tag contains any information.
*/
static inline bool
tag_is_defined(const struct tag *tag)
{
return !tag_is_empty(tag) || tag->time >= 0;
}
/**
* Returns the first value of the specified tag type, or NULL if none
* is present in this tag object.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment