Ensure next_uid() can never return 0.

This commit is contained in:
Andy
2014-03-17 19:50:29 +00:00
committed by Simon Kelley
parent 3f7483e816
commit d5082158ee

View File

@@ -74,13 +74,15 @@ static void cache_hash(struct crec *crecp);
static unsigned int next_uid(void)
{
static unsigned int uid = 1;
static unsigned int uid = 0;
uid++;
/* uid == 0 used to indicate CNAME to interface name. */
if (uid == 0)
uid++;
return uid++;
return uid;
}
void cache_init(void)