Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>

@@ -19,11 +19,11 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  * Copyright (c) 2015, Syneto S.R.L. All rights reserved.
  * Copyright 2016 Toomas Soome <tsoome@me.com>
  * Copyright 2016 RackTop Systems.
  */
 

@@ -5815,18 +5815,10 @@
                         MUTEX_LOCK(&gu->gu_lock);
                 }
 
                 MUTEX_UNLOCK(&gu->gu_lock);
         }
-
-        /*
-         * Unreachable for now -- there's currently no graceful cleanup
-         * called on exit().
-         */
-        MUTEX_UNLOCK(&gu->gu_lock);
-        scf_handle_destroy(h);
-        return (NULL);
 }
 
 static void
 set_initial_milestone(scf_handle_t *h)
 {

@@ -6188,19 +6180,10 @@
         /*CONSTCOND*/
         while (1) {
                 (void) pthread_cond_wait(&gu->gu_freeze_cv,
                     &gu->gu_freeze_lock);
         }
-
-        /*
-         * Unreachable for now -- there's currently no graceful cleanup
-         * called on exit().
-         */
-        (void) pthread_mutex_unlock(&gu->gu_freeze_lock);
-        scf_handle_destroy(h);
-
-        return (NULL);
 }
 
 
 /*
  * int next_action()