mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 01:57:14 +02:00
Merge branch 'mcatanzaro/#3716' into 'main'
gfileutils: fix computation of temporary file name Closes #3716 See merge request GNOME/glib!4674
This commit is contained in:
@@ -1538,9 +1538,9 @@ get_tmp_file (gchar *tmpl,
|
|||||||
static const char letters[] =
|
static const char letters[] =
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||||
static const int NLETTERS = sizeof (letters) - 1;
|
static const int NLETTERS = sizeof (letters) - 1;
|
||||||
gint64 value;
|
guint64 value;
|
||||||
gint64 now_us;
|
guint64 now_us;
|
||||||
static int counter = 0;
|
static guint counter = 0;
|
||||||
|
|
||||||
g_return_val_if_fail (tmpl != NULL, -1);
|
g_return_val_if_fail (tmpl != NULL, -1);
|
||||||
|
|
||||||
@@ -1559,7 +1559,7 @@ get_tmp_file (gchar *tmpl,
|
|||||||
|
|
||||||
for (count = 0; count < 100; value += 7777, ++count)
|
for (count = 0; count < 100; value += 7777, ++count)
|
||||||
{
|
{
|
||||||
gint64 v = value;
|
guint64 v = value;
|
||||||
|
|
||||||
/* Fill in the random bits. */
|
/* Fill in the random bits. */
|
||||||
XXXXXX[0] = letters[v % NLETTERS];
|
XXXXXX[0] = letters[v % NLETTERS];
|
||||||
|
Reference in New Issue
Block a user