common/edit: Don't use random() function.

Generate the random filename using our utility function
guestfs_int_random_string.  This also means that we will not need to
call srandom() in guestfish or virt-edit.
This commit is contained in:
Richard W.M. Jones
2017-01-26 19:23:46 +00:00
parent 004de6cf45
commit 5d607f752b
3 changed files with 6 additions and 18 deletions

View File

@@ -102,9 +102,6 @@ main (int argc, char *argv[])
bindtextdomain (PACKAGE, LOCALEBASEDIR);
textdomain (PACKAGE);
/* We use random(3) below. */
srandom (time (NULL));
enum { HELP_OPTION = CHAR_MAX + 1 };
static const char options[] = "a:b:c:d:e:m:vVx";