Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdlib Simplify to avoid pointless null pointer ari...



details:   https://anonhg.NetBSD.org/src/rev/51e7c545eeac
branches:  trunk
changeset: 319283:51e7c545eeac
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed May 23 21:21:27 2018 +0000

description:
Simplify to avoid pointless null pointer arithmetic.

diffstat:

 lib/libc/stdlib/merge.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 71a6031c05f4 -r 51e7c545eeac lib/libc/stdlib/merge.c
--- a/lib/libc/stdlib/merge.c   Wed May 23 21:20:20 2018 +0000
+++ b/lib/libc/stdlib/merge.c   Wed May 23 21:21:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: merge.c,v 1.15 2017/08/12 01:10:04 ginsbach Exp $      */
+/*     $NetBSD: merge.c,v 1.16 2018/05/23 21:21:27 joerg Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "from: @(#)merge.c      8.2 (Berkeley) 2/14/94";
 #else
-__RCSID("$NetBSD: merge.c,v 1.15 2017/08/12 01:10:04 ginsbach Exp $");
+__RCSID("$NetBSD: merge.c,v 1.16 2018/05/23 21:21:27 joerg Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -101,8 +101,7 @@
  */
 /* Assumption: PSIZE is a power of 2. */
 #define EVAL(p) ((u_char **)(void *)                                   \
-    ((u_char *)0 +                                                     \
-    (((u_char *)(void *)(p) + PSIZE - 1 - (u_char *) 0) & ~(PSIZE - 1))))
+    (((u_char *)(void *)(p) + PSIZE - 1 - (u_char *) 0) & ~(PSIZE - 1)))
 
 /*
  * Arguments are as for qsort.



Home | Main Index | Thread Index | Old Index