mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 00:38:07 +02:00
glib-aux: use nm_uuid_generate_random() helper
This commit is contained in:
parent
b4608b3ff7
commit
7a15144f75
3 changed files with 2 additions and 13 deletions
|
|
@ -2857,7 +2857,7 @@ again:
|
|||
if (!contents || !nm_uuid_parse(nm_strstrip(contents), &uuid)) {
|
||||
/* generate a random UUID instead. */
|
||||
is_fake = TRUE;
|
||||
_nm_utils_uuid_generate_random(&uuid);
|
||||
nm_uuid_generate_random(&uuid);
|
||||
}
|
||||
|
||||
if (!g_once_init_enter(&lock))
|
||||
|
|
|
|||
|
|
@ -3044,15 +3044,6 @@ _nm_utils_sriov_vf_from_strparts(const char *index,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NMUuid *
|
||||
_nm_utils_uuid_generate_random(NMUuid *out_uuid)
|
||||
{
|
||||
nm_assert(out_uuid);
|
||||
|
||||
uuid_generate_random(out_uuid->uuid);
|
||||
return out_uuid;
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_utils_uuid_is_null(const NMUuid *uuid)
|
||||
{
|
||||
|
|
@ -3081,7 +3072,7 @@ nm_utils_uuid_generate_buf_(char *buf)
|
|||
|
||||
nm_assert(buf);
|
||||
|
||||
_nm_utils_uuid_generate_random(&uuid);
|
||||
nm_uuid_generate_random(&uuid);
|
||||
return nm_uuid_unparse(&uuid, buf);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -352,8 +352,6 @@ gboolean _nm_utils_check_module_file(const char * name,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NMUuid *_nm_utils_uuid_generate_random(NMUuid *out_uuid);
|
||||
|
||||
gboolean nm_utils_uuid_is_null(const NMUuid *uuid);
|
||||
|
||||
#define NM_UTILS_UUID_TYPE_LEGACY 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue