2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-26 03:58:11 +00:00

Fix warning on unitialized value $mask

If not set, jump to returning undef.
This commit is contained in:
Jarrod Johnson
2019-10-24 14:57:49 -04:00
parent 0460a64b40
commit acbbeb8629

View File

@@ -1368,6 +1368,7 @@ sub formatNetmask
my $origType = shift;
my $newType = shift;
my $maskn;
if (not defined $mask) { return undef; }
if ($origType == 0)
{
$maskn = unpack("N", inet_aton($mask));