mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Ensure next_uid() can never return 0.
This commit is contained in:
@@ -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