use unsigned instead of uint32_t for LDB counters.
[Samba/cd1.git] / source3 / torture / t_strstr.c
blob49180b219f7e5ddaf9dee3f12a9d3be763abad2d
1 /*
2 * Copyright (C) 2003 by Martin Pool
4 * Test harness for strstr_m
5 */
7 #include "includes.h"
9 int main(int argc, char *argv[])
11 int i;
12 int iters = 1;
14 const char *ret = NULL;
16 /* Needed to initialize character set */
17 lp_load("/dev/null", True, False, False, True);
19 if (argc < 3) {
20 fprintf(stderr, "usage: %s STRING1 STRING2 [ITERS]\n"
21 "Compares two strings, prints the results of strstr_m\n",
22 argv[0]);
23 return 2;
25 if (argc >= 4)
26 iters = atoi(argv[3]);
28 for (i = 0; i < iters; i++) {
29 ret = strstr_m(argv[1], argv[2]);
32 if (ret == NULL)
33 ret = "(null)";
35 printf("%s\n", ret);
37 return 0;