On Sat, 11 Apr 2020 02:19:17 +0300 Vladimir D. Seleznev wrote: > Verbose QueryTags prints four field: tagname, tagvalue, tagtype and whether > it is an extension. To make it possible QueryTags uses new function > rpmTagIsExtension() that return 0 if tag is real, 1 if tag is an extension > or 2 if tag is not found. [...] > diff --git a/lib/rpmtag.h b/lib/rpmtag.h > index f74b451dc..8e860f927 100644 > --- a/lib/rpmtag.h > +++ b/lib/rpmtag.h > @@ -519,6 +519,13 @@ rpmTagType rpmTagGetTagType(rpmTagVal tag); > */ > rpmTagReturnType rpmTagGetReturnType(rpmTagVal tag); > > +/** \ingroup rpmtag > + * Return 0 if tag is real, 1 if tag is an extension, 2 on not found > + * @param tag tag value > + * @return 0 if tag is real, 1 if tag is an extension, 2 on not found I prpopose to change the return code semantics: rpmTagIsExtension is designed to return 3 possible values: yes, no or error. 1 is a good choise for yes, so it is OK 0 is a good choise for no, so it is OK But for the error — not found — it is better to use -1 to comply with commonly used semantics. Best regards, Andrew Savchenko