Browse code

cleanup: remove SetDead function

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>

Jintao Zhang authored on 2019/08/25 21:34:30
Showing 2 changed files
... ...
@@ -366,13 +366,6 @@ func (s *State) IsRemovalInProgress() bool {
366 366
 	return res
367 367
 }
368 368
 
369
-// SetDead sets the container state to "dead"
370
-func (s *State) SetDead() {
371
-	s.Lock()
372
-	s.Dead = true
373
-	s.Unlock()
374
-}
375
-
376 369
 // IsDead returns whether the Dead flag is set. Used by Container to check whether a container is dead.
377 370
 func (s *State) IsDead() bool {
378 371
 	s.Lock()
... ...
@@ -109,7 +109,9 @@ func TestStateRunStop(t *testing.T) {
109 109
 	}
110 110
 
111 111
 	// Set the state to dead and removed.
112
-	s.SetDead()
112
+	s.Lock()
113
+	s.Dead = true
114
+	s.Unlock()
113 115
 	s.SetRemoved()
114 116
 
115 117
 	// Wait for removed status or timeout.