mesa: Document that _mesa_enum_to_string() returns non-null (v2)

It always returns non-null, even if the number is an invalid enum.

Cc: Haixia Shi <hshi@chromium.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Change-Id: I26e8843c96130be972e66f48a49e362442e1bf97
This commit is contained in:
Chad Versace 2016-08-11 08:28:57 -07:00
parent f9f462936a
commit dd93cbc894
1 changed files with 6 additions and 1 deletions

View File

@ -83,7 +83,12 @@ static int compar_nr( const int *a, enum_elt *b )
static char token_tmp[20];
const char *_mesa_enum_to_string( int nr )
/**
* This function always returns a string. If the number is a valid enum, it
* returns the enum name. Otherwise, it returns a numeric string.
*/
const char *
_mesa_enum_to_string(int nr)
{
enum_elt *elt;