diff options
Diffstat (limited to 'libpod/lock')
-rw-r--r-- | libpod/lock/in_memory_locks.go | 2 | ||||
-rw-r--r-- | libpod/lock/shm/shm_lock_test.go | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libpod/lock/in_memory_locks.go b/libpod/lock/in_memory_locks.go index 1df0d2b61..db8f20e95 100644 --- a/libpod/lock/in_memory_locks.go +++ b/libpod/lock/in_memory_locks.go @@ -84,7 +84,7 @@ func (m *InMemoryManager) AllocateLock() (Locker, error) { // RetrieveLock retrieves a lock from the manager. func (m *InMemoryManager) RetrieveLock(id uint32) (Locker, error) { if id >= m.numLocks { - return nil, errors.Errorf("given lock ID %d is too large - this manager only supports lock indexes up to %d", id, m.numLocks - 1) + return nil, errors.Errorf("given lock ID %d is too large - this manager only supports lock indexes up to %d", id, m.numLocks-1) } return m.locks[id], nil diff --git a/libpod/lock/shm/shm_lock_test.go b/libpod/lock/shm/shm_lock_test.go index bdf0b19e5..0f3a96cca 100644 --- a/libpod/lock/shm/shm_lock_test.go +++ b/libpod/lock/shm/shm_lock_test.go @@ -17,8 +17,10 @@ import ( // to test without actually having multiple processes... // We can at least verify that the locks work within the local process. -// 4 * BITMAP_SIZE to ensure we have to traverse bitmaps -var numLocks uint32 = 4 * BitmapSize +var ( + // 4 * BITMAP_SIZE to ensure we have to traverse bitmaps + numLocks = 4 * BitmapSize +) const lockPath = "/libpod_test" |