[lxc-devel] [lxd/master] idmapset: fix typo in Intersects
tych0 on Github
lxc-bot at linuxcontainers.org
Wed Nov 16 19:21:42 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 476 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20161116/4729647d/attachment.bin>
-------------- next part --------------
From 997eac622adc304cd7731274ac719d3f051ae2ae Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.andersen at canonical.com>
Date: Wed, 16 Nov 2016 12:18:16 -0700
Subject: [PATCH] idmapset: fix typo in Intersects
It doesn't make sense to add e's map range to i; this is a typo, and we
should be using i's map range instead.
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
shared/idmapset_linux.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/shared/idmapset_linux.go b/shared/idmapset_linux.go
index b3d81d6..4e59d69 100644
--- a/shared/idmapset_linux.go
+++ b/shared/idmapset_linux.go
@@ -44,7 +44,7 @@ func (e *IdmapEntry) Intersects(i IdmapEntry) bool {
return true
case is_between(e.Hostid+e.Maprange, i.Hostid, i.Hostid+i.Maprange):
return true
- case is_between(i.Hostid+e.Maprange, e.Hostid, e.Hostid+e.Maprange):
+ case is_between(i.Hostid+i.Maprange, e.Hostid, e.Hostid+e.Maprange):
return true
case is_between(e.Nsid, i.Nsid, i.Nsid+i.Maprange):
return true
@@ -52,7 +52,7 @@ func (e *IdmapEntry) Intersects(i IdmapEntry) bool {
return true
case is_between(e.Nsid+e.Maprange, i.Nsid, i.Nsid+i.Maprange):
return true
- case is_between(i.Nsid+e.Maprange, e.Nsid, e.Nsid+e.Maprange):
+ case is_between(i.Nsid+i.Maprange, e.Nsid, e.Nsid+e.Maprange):
return true
}
}
More information about the lxc-devel
mailing list