[llvm-commits] [llvm] r108330 - /llvm/trunk/lib/System/Unix/Program.inc
Duncan Sands
baldrick at free.fr
Wed Jul 14 07:32:34 PDT 2010
Author: baldrick
Date: Wed Jul 14 09:32:33 2010
New Revision: 108330
URL: http://llvm.org/viewvc/llvm-project?rev=108330&view=rev
Log:
Rather than using an ifdef on the target to zero out fields,
just use memset to zero the entire struct.
Modified:
llvm/trunk/lib/System/Unix/Program.inc
Modified: llvm/trunk/lib/System/Unix/Program.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Program.inc?rev=108330&r1=108329&r2=108330&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Program.inc (original)
+++ llvm/trunk/lib/System/Unix/Program.inc Wed Jul 14 09:32:33 2010
@@ -310,12 +310,9 @@
// fact of having a handler at all causes the wait below to return with EINTR,
// unlike if we used SIG_IGN.
if (secondsToWait) {
-#if !defined(__HAIKU__) && !defined(__minix)
- Act.sa_sigaction = 0;
-#endif
+ memset(&Act, 0, sizeof(Act));
Act.sa_handler = TimeOutHandler;
sigemptyset(&Act.sa_mask);
- Act.sa_flags = 0;
sigaction(SIGALRM, &Act, &Old);
alarm(secondsToWait);
}
More information about the llvm-commits
mailing list