mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 08:10:08 +01:00
trivial: rename rand to avoid -Wshadow
This commit is contained in:
parent
afc7f17191
commit
eb2b990ddc
1 changed files with 4 additions and 4 deletions
|
|
@ -353,7 +353,7 @@ generate_duid_from_machine_id (void)
|
|||
gsize sumlen = sizeof (buffer);
|
||||
const guint16 duid_type = g_htons (4);
|
||||
uuid_t uuid;
|
||||
GRand *rand;
|
||||
GRand *generator;
|
||||
guint i;
|
||||
gboolean success = FALSE;
|
||||
|
||||
|
|
@ -380,10 +380,10 @@ generate_duid_from_machine_id (void)
|
|||
"or " LOCALSTATEDIR "/lib/dbus/machine-id to generate "
|
||||
"DHCPv6 DUID; creating non-persistent random DUID.");
|
||||
|
||||
rand = g_rand_new ();
|
||||
generator = g_rand_new ();
|
||||
for (i = 0; i < sizeof (buffer) / sizeof (guint32); i++)
|
||||
((guint32 *) buffer)[i] = g_rand_int (rand);
|
||||
g_rand_free (rand);
|
||||
((guint32 *) buffer)[i] = g_rand_int (generator);
|
||||
g_rand_free (generator);
|
||||
}
|
||||
|
||||
/* Generate a DHCP Unique Identifier for DHCPv6 using the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue