applied, thanks!
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> First, many thanks for the patch!
>
> > +my $mac = sprintf("%02X:" x 6, unpack("C6", $rand));
> > +
> > +# remove superfluous ":" at end
> > +chop($mac);
>
> I wonder if it would be simpler to use a static format string instead?
>
> my $mac = sprintf("%02X:%02X:%02X:%02X:%02X:%02X"
First, many thanks for the patch!
> +my $mac = sprintf("%02X:" x 6, unpack("C6", $rand));
> +
> +# remove superfluous ":" at end
> +chop($mac);
I wonder if it would be simpler to use a static format string instead?
my $mac = sprintf("%02X:%02X:%02X:%02X:%02X:%02X", unpack("C6", $rand
---
src/PVE/Tools.pm | 20 ++--
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index 3f3958e..cda0797 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -940,21 +940,13 @@ sub random_ether_addr {
my $rand = Digest::SHA