]> git.proxmox.com Git - pve-manager.git/commit
fix undefined value warning in resources api call
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 5 Jul 2016 12:45:35 +0000 (14:45 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 7 Jul 2016 06:15:15 +0000 (08:15 +0200)
commitc37f23f53b2ef9f2b2408aef0b88e73c5a693541
tree85f473b7d669956fcec02f9803d2f92f1e2d290e
parent6897aeb307f763482031765ace2c9cd514bf1df4
fix undefined value warning in resources api call

With the new calculation $pe->{maxcpu} was used before being
initialized to zero. Moving the initialization up.
Additionally setting $pe->{cpu} to $entry->{cpu} if maxcpu
is not set seems pointless as with its factor (maxcpu)
initialized to zero it is cancelled out anyway.
PVE/API2/Cluster.pm