Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdlib Fix portability.
details: https://anonhg.NetBSD.org/src/rev/46066bd3195d
branches: trunk
changeset: 340040:46066bd3195d
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Aug 20 20:08:04 2015 +0000
description:
Fix portability.
diffstat:
lib/libc/stdlib/reallocarr.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r d46832e6f278 -r 46066bd3195d lib/libc/stdlib/reallocarr.c
--- a/lib/libc/stdlib/reallocarr.c Thu Aug 20 18:25:09 2015 +0000
+++ b/lib/libc/stdlib/reallocarr.c Thu Aug 20 20:08:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: reallocarr.c,v 1.3 2015/07/28 17:13:34 kamil Exp $ */
+/* $NetBSD: reallocarr.c,v 1.4 2015/08/20 20:08:04 joerg Exp $ */
/*-
* Copyright (c) 2015 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -34,7 +34,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: reallocarr.c,v 1.3 2015/07/28 17:13:34 kamil Exp $");
+__RCSID("$NetBSD: reallocarr.c,v 1.4 2015/08/20 20:08:04 joerg Exp $");
#include "namespace.h"
#include <errno.h>
@@ -50,7 +50,7 @@
#endif
#endif
-#define SQRT_SIZE_MAX (1UL << (sizeof(size_t) << 2))
+#define SQRT_SIZE_MAX (((size_t)1) << (sizeof(size_t) * CHAR_BIT / 2))
#if !HAVE_REALLOCARR
int
Home |
Main Index |
Thread Index |
Old Index