From 219ad7da07b9a0277138373cfa3b2c0ff2506c52 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sat, 2 Apr 2005 00:56:30 +0000 Subject: r6175: Fix crash bug and compiler warnings in strchr_m() test. Bugzilla #2565. (This used to be commit 17d13b57136d1f58c450d4587476304482bbd12a) --- source3/torture/t_strstr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/torture/t_strstr.c') diff --git a/source3/torture/t_strstr.c b/source3/torture/t_strstr.c index 25709526fe..7b928fb26b 100644 --- a/source3/torture/t_strstr.c +++ b/source3/torture/t_strstr.c @@ -11,7 +11,7 @@ int main(int argc, char *argv[]) int i; int iters = 1; - char *ret; + const char *ret = NULL; /* Needed to initialize character set */ lp_load("/dev/null", True, False, False); @@ -29,6 +29,9 @@ int main(int argc, char *argv[]) ret = strstr_m(argv[1], argv[2]); } + if (ret == NULL) + ret = "(null)"; + printf("%s\n", ret); return 0; -- cgit