summaryrefslogtreecommitdiff
path: root/tests/test-memchr.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-01-08 11:51:39 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-01-08 11:51:39 +0100
commit2959e59fab3bab834368adefd90bd4b1b094366b (patch)
tree7d0ae09775ea950056193eaa2ca93844299d46f1 /tests/test-memchr.c
parentc78359d9542c86b972aac373efcf7bc7a8a560e5 (diff)
parentbe8efac78d067c138ad8dda03df4336e73f94887 (diff)
Update upstream source from tag 'upstream/1.0'
Update to upstream version '1.0' with Debian dir 4875e7dc9f7277205f0086a63ee21ccdb1d54593
Diffstat (limited to 'tests/test-memchr.c')
-rw-r--r--tests/test-memchr.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test-memchr.c b/tests/test-memchr.c
index f191587..84f52ab 100644
--- a/tests/test-memchr.c
+++ b/tests/test-memchr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2022 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
@@ -49,7 +49,12 @@ main (void)
ASSERT (MEMCHR (input, 'a', n) == input);
ASSERT (MEMCHR (input, 'a', 0) == NULL);
- ASSERT (MEMCHR (zerosize_ptr (), 'a', 0) == NULL);
+
+ {
+ void *page_boundary = zerosize_ptr ();
+ if (page_boundary)
+ ASSERT (MEMCHR (page_boundary, 'a', 0) == NULL);
+ }
ASSERT (MEMCHR (input, 'b', n) == input + 1);
ASSERT (MEMCHR (input, 'c', n) == input + 2);
@@ -88,7 +93,7 @@ main (void)
/* Check that memchr() does not read past the first occurrence of the
byte being searched. See the Austin Group's clarification
- <http://www.opengroup.org/austin/docs/austin_454.txt>.
+ <https://www.opengroup.org/austin/docs/austin_454.txt>.
Test both '\0' and something else, since some implementations
special-case searching for NUL.
*/