Skip to content

Commit

Permalink
manager/allocator/cnmallocator: IsAttachmentAllocated: simplify
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Jul 29, 2023
1 parent e2dbb1d commit b0ee1de
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions manager/allocator/cnmallocator/networkallocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,7 @@ func (na *cnmNetworkAllocator) DeallocateTask(t *api.Task) error {

// IsAttachmentAllocated returns if the passed node and network has resources allocated or not.
func (na *cnmNetworkAllocator) IsAttachmentAllocated(node *api.Node, networkAttachment *api.NetworkAttachment) bool {
if node == nil {
return false
}

if networkAttachment == nil || networkAttachment.Network == nil {
if node == nil || networkAttachment == nil || networkAttachment.Network == nil {
return false
}

Expand Down

0 comments on commit b0ee1de

Please sign in to comment.