diff options
author | Bruno Haible <bruno@clisp.org> | 2021-05-13 12:11:04 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-05-13 12:11:04 +0200 |
commit | 3b4cd76a8e64d4b70e2aff61cbca77df056ffcf4 (patch) | |
tree | ecdb99986c806c484c1e96abc1010b444909dfb9 /tests/test-reallocarray.c | |
parent | 832823d1e3c6589c29b85df53d1e7121df530ffc (diff) | |
download | gnulib-3b4cd76a8e64d4b70e2aff61cbca77df056ffcf4.tar.gz |
reallocarray tests: Avoid test failure on NetBSD.
* tests/test-reallocarray.c (main): Accept EOVERFLOW error code.
Diffstat (limited to 'tests/test-reallocarray.c')
-rw-r--r-- | tests/test-reallocarray.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-reallocarray.c b/tests/test-reallocarray.c index 6de355e6bd..8067542d58 100644 --- a/tests/test-reallocarray.c +++ b/tests/test-reallocarray.c @@ -41,7 +41,8 @@ main () p = reallocarray (p, SIZE_MAX / n + 1, n); if (p) return 3; - if (errno != ENOMEM) + if (!(errno == ENOMEM + || errno == EOVERFLOW /* NetBSD */)) return 4; /* Reallocarray should not crash with zero sizes. */ |