s4-torture: remove unchecked read from smb2 create
[Samba/wip.git] / source3 / torture / t_strcmp.c
blobe6828e421058df677406055be6a78439145c2e9c
1 /*
2 * Copyright (C) 2003 by Martin Pool
4 * Test harness for strcasecmp_m
5 */
7 #include "includes.h"
9 int main(int argc, char *argv[])
11 int i, ret;
12 int iters = 1;
14 /* Needed to initialize character set */
15 lp_load_global("/dev/null");
17 if (argc < 3) {
18 fprintf(stderr, "usage: %s STRING1 STRING2 [ITERS]\n"
19 "Compares two strings, prints the results of strcasecmp_m\n",
20 argv[0]);
21 return 2;
23 if (argc >= 4)
24 iters = atoi(argv[3]);
26 for (i = 0; i < iters; i++)
27 ret = strcasecmp_m(argv[1], argv[2]);
29 printf("%d\n", ret);
31 return 0;