Mercurial > hg > octave-lojdl > gnulib-hg
diff tests/test-memchr2.c @ 11570:1e84e9b3384a
Make some tests ISO C 99 compliant.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 14 May 2009 01:39:07 +0200 (2009-05-13) |
parents | 0be6f1ab456d |
children | e45d9bb2233e |
line wrap: on
line diff
--- a/tests/test-memchr2.c +++ b/tests/test-memchr2.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Free Software Foundation + * Copyright (C) 2008-2009 Free Software Foundation * Written by Eric Blake * * This program is free software: you can redistribute it and/or modify @@ -23,6 +23,8 @@ #include <stdlib.h> #include <string.h> +#include "zerosize-ptr.h" + #define ASSERT(expr) \ do \ { \ @@ -58,7 +60,7 @@ ASSERT (MEMCHR2 (input, 'b', 'a', n) == input); ASSERT (MEMCHR2 (input, 'a', 'b', 0) == NULL); - ASSERT (MEMCHR2 (NULL, 'a', 'b', 0) == NULL); + ASSERT (MEMCHR2 (zerosize_ptr (), 'a', 'b', 0) == NULL); ASSERT (MEMCHR2 (input, 'b', 'd', n) == input + 1); ASSERT (MEMCHR2 (input + 2, 'b', 'd', n - 2) == input + 1026);