summaryrefslogtreecommitdiff
path: root/lib/xalloc.h
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-06-30 15:46:05 +0000
committerJim Meyering <jim@meyering.net>2005-06-30 15:46:05 +0000
commit4ff07ebe3c0ba36b97d6c2d50c524f2097cc3db7 (patch)
treed057e4651e1f401eb42b643652bfd514366a3272 /lib/xalloc.h
parentb2915239d7138a200b4b0fae373a32aeddc5eea6 (diff)
downloadcoreutils-4ff07ebe3c0ba36b97d6c2d50c524f2097cc3db7.tar.xz
(VERIFY_EXPR): Undef and add a comment.
Diffstat (limited to 'lib/xalloc.h')
-rw-r--r--lib/xalloc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/xalloc.h b/lib/xalloc.h
index cd48713ba..24b2d5804 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -56,8 +56,10 @@ void *x2nrealloc (void *p, size_t *pn, size_t s);
void *xmemdup (void const *p, size_t s);
char *xstrdup (char const *str);
+/* Verify a requirement at compile-time (unlike assert, which is runtime). */
+# undef VERIFY_EXPR
# define VERIFY_EXPR(assertion) \
- (void)((struct {char a[(assertion) ? 1 : -1]; } *) 0)
+ (void)((struct {char a[(assertion) ? 1 : -1]; } *) 0)
/* Using x2realloc (when appropriate) usually makes your code more
readable than using x2nrealloc, but it also makes it so your