svn commit: samba r6175 - branches/SAMBA_3_0/source/torture
trunk/source/torture
tpot at samba.org
tpot at samba.org
Sat Apr 2 00:56:31 GMT 2005
Author: tpot
Date: 2005-04-02 00:56:30 +0000 (Sat, 02 Apr 2005)
New Revision: 6175
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6175
Log:
Fix crash bug and compiler warnings in strchr_m() test. Bugzilla #2565.
Modified:
branches/SAMBA_3_0/source/torture/t_strstr.c
trunk/source/torture/t_strstr.c
Changeset:
Modified: branches/SAMBA_3_0/source/torture/t_strstr.c
===================================================================
--- branches/SAMBA_3_0/source/torture/t_strstr.c 2005-04-02 00:13:27 UTC (rev 6174)
+++ branches/SAMBA_3_0/source/torture/t_strstr.c 2005-04-02 00:56:30 UTC (rev 6175)
@@ -11,7 +11,7 @@
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 @@
ret = strstr_m(argv[1], argv[2]);
}
+ if (ret == NULL)
+ ret = "(null)";
+
printf("%s\n", ret);
return 0;
Modified: trunk/source/torture/t_strstr.c
===================================================================
--- trunk/source/torture/t_strstr.c 2005-04-02 00:13:27 UTC (rev 6174)
+++ trunk/source/torture/t_strstr.c 2005-04-02 00:56:30 UTC (rev 6175)
@@ -11,7 +11,7 @@
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 @@
ret = strstr_m(argv[1], argv[2]);
}
+ if (ret == NULL)
+ ret = "(null)";
+
printf("%s\n", ret);
return 0;
More information about the samba-cvs
mailing list