1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

Fix bug 7754 - samba uses index(), marked as legacy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 27 19:25:16 UTC 2010 on sn-devel-104
This commit is contained in:
Sven Neumann 2010-10-27 11:42:34 -07:00 committed by Jeremy Allison
parent 8c4d023cc9
commit 0bc94c21e5

View File

@ -621,14 +621,14 @@ static bool _reg_perfcount_add_counter(struct PERF_DATA_BLOCK *block,
obj = NULL;
memset(buf, 0, PERFCOUNT_MAX_LEN);
memcpy(buf, data.dptr, data.dsize);
begin = index(buf, '[');
end = index(buf, ']');
begin = strchr(buf, '[');
end = strchr(buf, ']');
if(begin == NULL || end == NULL)
return False;
start = begin+1;
while(start < end) {
stop = index(start, ',');
stop = strchr(start, ',');
if(stop == NULL)
stop = end;
*stop = '\0';