* Written by Bruno Haible and Eric Blake
*
* This program is free software: you can redistribute it and/or modify
* Written by Bruno Haible and Eric Blake
*
* This program is free software: you can redistribute it and/or modify
- const char *result = memmem (NULL, 0, "foo", 3);
+ const char *result = memmem (zerosize_ptr (), 0, "foo", 3);
- const char *result = memmem (input, strlen (input), NULL, 0);
+ const char *result = memmem (input, strlen (input), null_ptr (), 0);
- for (; repeat > 0; repeat--)
- {
- ASSERT (memmem (haystack, m, needle, n) == haystack + 1);
- }
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (memmem (haystack, m, needle, n) == haystack + 1);
+ }
- for (; repeat > 0; repeat--)
- {
- ASSERT (memmem (haystack, n, needle, m) == NULL);
- }
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (memmem (haystack, n, needle, m) == NULL);
+ }
- result = memmem (haystack, 2 * m + 1, needle, m + 1);
- ASSERT (result == haystack + m);
+ result = memmem (haystack, 2 * m + 1, needle, m + 1);
+ ASSERT (result == haystack + m);
- memset (haystack, 'A', m);
- memset (needle, 'B', n);
+ memset (haystack, 'A', m);
+ memset (needle, 'B', n);
- for (; repeat > 0; repeat--)
- {
- result = memmem (haystack, m, needle, n);
- ASSERT (result == NULL);
- }
+ for (; repeat > 0; repeat--)
+ {
+ result = memmem (haystack, m, needle, n);
+ ASSERT (result == NULL);
+ }