mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-21 11:39:39 +00:00
Ensure next_uid() can never return 0.
This commit is contained in:
1 parent
3f7483e816
commit
d5082158ee
1 file changed
+4
-2
+4
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user