summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-12-02 09:02:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-12-02 09:02:58 +0000
commitac9481a6895af813b8ace2d4d7199073d21b93c9 (patch)
treefe89130469dc17fa87b70f018ceac23644b6d85b /lib/libc/sys
parent2278f416bf2882e99e723a9b77e279a47cbc03be (diff)
KNF
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/stack_protector.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/sys/stack_protector.c b/lib/libc/sys/stack_protector.c
index a51fe1e463f..783f38c3857 100644
--- a/lib/libc/sys/stack_protector.c
+++ b/lib/libc/sys/stack_protector.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stack_protector.c,v 1.1 2002/12/02 09:00:15 miod Exp $ */
+/* $OpenBSD: stack_protector.c,v 1.2 2002/12/02 09:02:57 deraadt Exp $ */
/*
* Copyright (c) 2002 Hiroaki Etoh, Federico G. Schwindt, and Miodrag Vallat.
@@ -28,14 +28,14 @@
*/
#if defined(LIBC_SCCS) && !defined(list)
-static char rcsid[] = "$OpenBSD: stack_protector.c,v 1.1 2002/12/02 09:00:15 miod Exp $";
+static char rcsid[] = "$OpenBSD: stack_protector.c,v 1.2 2002/12/02 09:02:57 deraadt Exp $";
#endif
#include <sys/param.h>
#include <sys/sysctl.h>
#include <syslog.h>
-long __guard[8] = {0,0,0,0,0,0,0,0};
+long __guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
static void __guard_setup(void) __attribute__ ((constructor));
void __stack_smash_handler(char func[], int damaged __attribute__((unused)));
@@ -53,15 +53,15 @@ __guard_setup(void)
len = 4;
for (i = 0; i < sizeof(__guard) / 4; i++) {
- if (sysctl(mib, 2, (char*)&((int*)__guard)[i],
+ if (sysctl(mib, 2, (char *)&((int *)__guard)[i],
&len, NULL, 0) == -1)
break;
}
if (i < sizeof(__guard) / 4) {
/* If sysctl was unsuccessful, use the "terminator canary". */
- ((char*)__guard)[0] = 0; ((char*)__guard)[1] = 0;
- ((char*)__guard)[2] = '\n'; ((char*)__guard)[3] = 255;
+ ((char *)__guard)[0] = 0; ((char*)__guard)[1] = 0;
+ ((char *)__guard)[2] = '\n'; ((char *)__guard)[3] = 255;
}
}