Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/arm/misc Reorganize to appease lint.
details: https://anonhg.NetBSD.org/src/rev/7aef65ad7c67
branches: trunk
changeset: 784526:7aef65ad7c67
user: matt <matt%NetBSD.org@localhost>
date: Thu Jan 31 06:47:55 2013 +0000
description:
Reorganize to appease lint.
diffstat:
lib/libc/arch/arm/misc/arm_initfini.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (38 lines):
diff -r 97bab0739b9d -r 7aef65ad7c67 lib/libc/arch/arm/misc/arm_initfini.c
--- a/lib/libc/arch/arm/misc/arm_initfini.c Wed Jan 30 20:48:27 2013 +0000
+++ b/lib/libc/arch/arm/misc/arm_initfini.c Thu Jan 31 06:47:55 2013 +0000
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
-__RCSID("$NetBSD: arm_initfini.c,v 1.1 2013/01/29 19:14:54 matt Exp $");
+__RCSID("$NetBSD: arm_initfini.c,v 1.2 2013/01/31 06:47:55 matt Exp $");
/*
* To properly implement setjmp/longjmp for the ARM AAPCS ABI, it has to be
@@ -42,6 +42,7 @@
#include <sys/sysctl.h>
#include <stdbool.h>
+#include <stddef.h>
int _libc_arm_fpu_present;
static bool _libc_aapcs_initialized;
@@ -51,11 +52,10 @@
void
_libc_aapcs_init(void)
{
- if (_libc_aapcs_initialized)
- return;
-
- _libc_aapcs_initialized = true;
- size_t len = sizeof(_libc_arm_fpu_present);
- (void)sysctlbyname("machdep.fpu_present", &_libc_arm_fpu_present, &len,
- NULL, 0);
+ if (!_libc_aapcs_initialized) {
+ size_t len = sizeof(_libc_arm_fpu_present);
+ _libc_aapcs_initialized = true;
+ (void)sysctlbyname("machdep.fpu_present",
+ &_libc_arm_fpu_present, &len, NULL, 0);
+ }
}
Home |
Main Index |
Thread Index |
Old Index