svn commit: r277702 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Sun Jan 25 14:32:49 UTC 2015
Author: pho
Date: Sun Jan 25 14:32:48 2015
New Revision: 277702
URL: https://svnweb.freebsd.org/changeset/base/277702
Log:
Code cleanup.
Sponsored by: EMC / Isilon storage division
Modified:
user/pho/stress2/misc/core.sh
Modified: user/pho/stress2/misc/core.sh
==============================================================================
--- user/pho/stress2/misc/core.sh Sun Jan 25 14:31:44 2015 (r277701)
+++ user/pho/stress2/misc/core.sh Sun Jan 25 14:32:48 2015 (r277702)
@@ -52,30 +52,28 @@ done
rm -f core
exit
EOF
-#include <string.h>
+#include <err.h>
#include <signal.h>
-#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <time.h>
-#include <err.h>
+#include <unistd.h>
#define SIZ 10*1024*1024
int
main(int argc, char **argv)
{
- char *cp = 0;
+ char *cp;
if ((cp = malloc(SIZ)) == NULL)
err(1, "Could not malloc 10Mb!");
memset(cp, 1, SIZ);
-// printf("sleep %d\n", (120 - (time(NULL) % 120))); fflush(stdout);
sleep(120 - (time(NULL) % 120));
raise(SIGSEGV);
-// printf(".\n");
return (0);
}
More information about the svn-src-user
mailing list