git.samba.org
/
jpeach
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c7de76
)
r6175: Fix crash bug and compiler warnings in strchr_m() test. Bugzilla #2565.
author
Tim Potter
<tpot@samba.org>
Sat, 2 Apr 2005 00:56:30 +0000
(
00:56
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 15:56:28 +0000
(10:56 -0500)
source/torture/t_strstr.c
patch
|
blob
|
history
diff --git
a/source/torture/t_strstr.c
b/source/torture/t_strstr.c
index 25709526fe84d9487f9731346de036295394eb2b..7b928fb26bea41f017526aa3c317a7866eeb7001 100644
(file)
--- a/
source/torture/t_strstr.c
+++ b/
source/torture/t_strstr.c
@@
-11,7
+11,7
@@
int main(int argc, char *argv[])
int i;
int iters = 1;
- c
har *ret
;
+ c
onst 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;