Ver Fonte

on Bernd's request, remove commented-out code snippets

Denis Vlasenko há 16 anos atrás
pai
commit
fbb32ad9b6

+ 0 - 4
libc/misc/syslog/syslog.c

@@ -207,10 +207,6 @@ vsyslog(int pri, const char *fmt, va_list ap)
 
 	memset(&action, 0, sizeof(action));
 	action.sa_handler = closelog_intern;
-	/* __sigemptyset(&action.sa_mask); - memset already did it */
-	/* Only two errors are possible for sigaction:
-	 * EFAULT (bad address of &oldaction) and EINVAL (invalid signo)
-	 * none of which can happen here. */
 	sigaction(SIGPIPE, &action, &oldaction);
 
 	saved_errno = errno;

+ 0 - 1
libc/pwd_grp/lckpwdf.c

@@ -111,7 +111,6 @@ lckpwdf (void)
   memset (&new_act, '\0', sizeof (struct sigaction));
   new_act.sa_handler = noop_handler;
   __sigfillset (&new_act.sa_mask);
-  /* new_act.sa_flags = 0; */
 
   /* Install new action handler for alarm and save old.  */
   if (sigaction (SIGALRM, &new_act, &saved_act) < 0) {

+ 0 - 2
libc/signal/sigignore.c

@@ -31,8 +31,6 @@ int sigignore (int sig)
   struct sigaction act;
 
   memset(&act, 0, sizeof(act));
-  /*__sigemptyset (&act.sa_mask);*/
-  /*act.sa_flags = 0;*/
   act.sa_handler = SIG_IGN;
 
   return sigaction (sig, &act, NULL);

+ 0 - 2
libc/signal/sigset.c

@@ -55,8 +55,6 @@ __sighandler_t sigset (int sig, __sighandler_t disp)
 #endif	/* SIG_HOLD */
 
   memset(&act, 0, sizeof(act));
-  //__sigemptyset (&act.sa_mask);
-  //act.sa_flags = 0;
   act.sa_handler = disp;
   if (sigaction (sig, &act, &oact) < 0)
     return SIG_ERR;

+ 0 - 1
libc/stdlib/abort.c

@@ -94,7 +94,6 @@ abort_it:
 			if (SIG_DFL) /* if it's constant zero, already done */
 				act.sa_handler = SIG_DFL;
 			__sigfillset(&act.sa_mask);
-			/*act.sa_flags = 0; - memset did it */
 			sigaction(SIGABRT, &act, NULL);
 
 			goto abort_it;

+ 0 - 1
libc/sysdeps/linux/common/ssp.c

@@ -58,7 +58,6 @@ static void block_signals(void)
 	/* Make the default handler associated with the signal handler */
 	memset(&sa, 0, sizeof(sa));
 	__sigfillset(&sa.sa_mask);	/* Block all signals */
-	/* sa.sa_flags = 0; - memset did it */
 	if (SIG_DFL) /* if it's constant zero, it's already done */
 		sa.sa_handler = SIG_DFL;
 	sigaction(SSP_SIGTYPE, &sa, NULL);

+ 0 - 6
libpthread/linuxthreads.old/pthread.c

@@ -473,17 +473,13 @@ static void pthread_initialize(void)
      will be inherited by all other threads. */
   memset(&sa, 0, sizeof(sa));
   sa.sa_handler = pthread_handle_sigrestart;
-  /* __sigemptyset(&sa.sa_mask); */
-  /* sa.sa_flags = 0; */
   __libc_sigaction(__pthread_sig_restart, &sa, NULL);
   sa.sa_handler = pthread_handle_sigcancel;
   sigaddset(&sa.sa_mask, __pthread_sig_restart);
-  /* sa.sa_flags = 0; */
   __libc_sigaction(__pthread_sig_cancel, &sa, NULL);
   if (__pthread_sig_debug > 0) {
       sa.sa_handler = pthread_handle_sigdebug;
       __sigemptyset(&sa.sa_mask);
-      /* sa.sa_flags = 0; */
       __libc_sigaction(__pthread_sig_debug, &sa, NULL);
   }
   /* Initially, block __pthread_sig_restart. Will be unblocked on demand. */
@@ -930,8 +926,6 @@ void __pthread_kill_other_threads_np(void)
      implementation uses since this would be passed to the new
      process.  */
   memset(&sa, 0, sizeof(sa));
-  /*__sigemptyset(&sa.sa_mask);*/
-  /*sa.sa_flags = 0;*/
   if (SIG_DFL) /* if it's constant zero, it's already done */
     sa.sa_handler = SIG_DFL;
   __libc_sigaction(__pthread_sig_restart, &sa, NULL);

+ 0 - 2
libpthread/linuxthreads.old/signals.c

@@ -209,8 +209,6 @@ int sigwait(const sigset_t * set, int * sig)
 	  sighandler[s].old == (arch_sighandler_t) SIG_IGN) {
         memset(&sa, 0, sizeof(sa));
         sa.sa_handler = pthread_null_sighandler;
-        /* __sigemptyset(&sa.sa_mask); */
-        /* sa.sa_flags = 0; */
         sigaction(s, &sa, NULL);
       }
     }

+ 1 - 7
libpthread/linuxthreads/pthread.c

@@ -563,17 +563,13 @@ static void pthread_initialize(void)
      will be inherited by all other threads. */
   memset(&sa, 0, sizeof(sa));
   sa.sa_handler = pthread_handle_sigrestart;
-  /* __sigemptyset(&sa.sa_mask); */
-  /* sa.sa_flags = 0; */
   __libc_sigaction(__pthread_sig_restart, &sa, NULL);
   sa.sa_handler = pthread_handle_sigcancel;
   sigaddset(&sa.sa_mask, __pthread_sig_restart);
-  /* sa.sa_flags = 0; */
   __libc_sigaction(__pthread_sig_cancel, &sa, NULL);
   if (__pthread_sig_debug > 0) {
     sa.sa_handler = pthread_handle_sigdebug;
     __sigemptyset(&sa.sa_mask);
-    /* sa.sa_flags = 0; */
     __libc_sigaction(__pthread_sig_debug, &sa, NULL);
   }
   /* Initially, block __pthread_sig_restart. Will be unblocked on demand. */
@@ -1153,9 +1149,7 @@ void __pthread_kill_other_threads_np(void)
      implementation uses since this would be passed to the new
      process.  */
   memset(&sa, 0, sizeof(sa));
-  /*__sigemptyset(&sa.sa_mask);*/
-  /*sa.sa_flags = 0;*/
-  if (SIG_DFL) /* if it's constant zero, it's already done too */
+  if (SIG_DFL) /* if it's constant zero, it's already done */
     sa.sa_handler = SIG_DFL;
   __libc_sigaction(__pthread_sig_restart, &sa, NULL);
   __libc_sigaction(__pthread_sig_cancel, &sa, NULL);