]> sourceware.org Git - glibc.git/commitdiff
Simplify dl-vdso.h use of assert.
authorRoland McGrath <roland@hack.frob.com>
Tue, 22 May 2012 21:24:54 +0000 (14:24 -0700)
committerRoland McGrath <roland@hack.frob.com>
Tue, 22 May 2012 21:24:54 +0000 (14:24 -0700)
ChangeLog
sysdeps/unix/sysv/linux/dl-vdso.h

index 9212a037162bf5246d0134dc8094829ed23d730d..c487caf64dd3f79588796a0d9115d1dd0f0bdbe5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-22  Roland McGrath  <roland@hack.frob.com>
+
+       * sysdeps/unix/sysv/linux/dl-vdso.h (CHECK_HASH): Macro removed.
+       (PREPARE_VERSION): Just use assert instead, it will be elided
+       under [NDEBUG] anyway.
+
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/unix/sysv/linux/Makefile: Include
index 03f03788b5ed94624ba151a0b32f6e67ad2d2744..c30671de72c3f2fe3646b1b5242e4c0ca804e3fe 100644 (file)
@@ -1,5 +1,5 @@
 /* ELF symbol resolve functions for VDSO objects.
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 
 #include <assert.h>
 #include <ldsodefs.h>
-
-#ifdef NDEBUG
-# define CHECK_HASH(var) do {} while (0)
-#else
-# include <dl-hash.h>
-# define CHECK_HASH(var) assert (var.hash == _dl_elf_hash (var.name))
-#endif
+#include <dl-hash.h>
 
 /* Create version number record for lookup.  */
 #define PREPARE_VERSION(var, vname, vhash) \
@@ -35,7 +29,7 @@
   var.name = vname;                                                          \
   var.hidden = 1;                                                            \
   var.hash = vhash;                                                          \
-  CHECK_HASH (var);                                                          \
+  assert (var.hash == _dl_elf_hash (var.name));                                      \
   /* We don't have a specific file where the symbol can be found.  */        \
   var.filename = NULL
 
This page took 0.106578 seconds and 5 git commands to generate.