6ca6e8
commit 68e036f27f31c3378201702e182246504fb00f87
6ca6e8
Author: Florian Weimer <fweimer@redhat.com>
6ca6e8
Date:   Wed Aug 3 11:41:53 2022 +0200
6ca6e8
6ca6e8
    nptl: Remove uses of assert_perror
6ca6e8
    
6ca6e8
    __pthread_sigmask cannot actually fail with valid pointer arguments
6ca6e8
    (it would need a really broken seccomp filter), and we do not check
6ca6e8
    for errors elsewhere.
6ca6e8
    
6ca6e8
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
6ca6e8
6ca6e8
diff --git a/sysdeps/nptl/gai_misc.h b/sysdeps/nptl/gai_misc.h
6ca6e8
index 261e24dae62d7871..700fd5c46b4b7c82 100644
6ca6e8
--- a/sysdeps/nptl/gai_misc.h
6ca6e8
+++ b/sysdeps/nptl/gai_misc.h
6ca6e8
@@ -81,9 +81,7 @@ __gai_start_notify_thread (void)
6ca6e8
 {
6ca6e8
   sigset_t ss;
6ca6e8
   sigemptyset (&ss);
6ca6e8
-  int sigerr __attribute__ ((unused));
6ca6e8
-  sigerr = __pthread_sigmask (SIG_SETMASK, &ss, NULL);
6ca6e8
-  assert_perror (sigerr);
6ca6e8
+  (void) __pthread_sigmask (SIG_SETMASK, &ss, NULL);
6ca6e8
 }
6ca6e8
 
6ca6e8
 extern inline int
6ca6e8
@@ -106,15 +104,12 @@ __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
6ca6e8
   sigset_t ss;
6ca6e8
   sigset_t oss;
6ca6e8
   sigfillset (&ss);
6ca6e8
-  int sigerr __attribute__ ((unused));
6ca6e8
-  sigerr = __pthread_sigmask (SIG_SETMASK, &ss, &oss;;
6ca6e8
-  assert_perror (sigerr);
6ca6e8
+  (void) __pthread_sigmask (SIG_SETMASK, &ss, &oss;;
6ca6e8
 
6ca6e8
   int ret = __pthread_create (threadp, &attr, tf, arg);
6ca6e8
 
6ca6e8
   /* Restore the signal mask.  */
6ca6e8
-  sigerr = __pthread_sigmask (SIG_SETMASK, &oss, NULL);
6ca6e8
-  assert_perror (sigerr);
6ca6e8
+  (void) __pthread_sigmask (SIG_SETMASK, &oss, NULL);
6ca6e8
 
6ca6e8
   (void) __pthread_attr_destroy (&attr);
6ca6e8
   return ret;