mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
s3:net registry check: replace rawmemchr by functionally equivalent portable strchr
rawmemchr is glibc only - not portable. Remarked by Ira Cooper. Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Tue Dec 6 12:20:48 CET 2011 on sn-devel-104
This commit is contained in:
@ -211,7 +211,7 @@ static bool tdb_data_is_cstr(TDB_DATA d) {
|
||||
if (tdb_data_is_empty(d) || (d.dptr[d.dsize-1] != '\0')) {
|
||||
return false;
|
||||
}
|
||||
return rawmemchr(d.dptr, '\0') == &d.dptr[d.dsize-1];
|
||||
return strchr((char *)d.dptr, '\0') == (char *)&d.dptr[d.dsize-1];
|
||||
}
|
||||
|
||||
static char* tdb_data_print(TALLOC_CTX *mem_ctx, TDB_DATA d)
|
||||
@ -664,7 +664,7 @@ static bool srprs_path(const char **ptr, const char* prefix, char sep,
|
||||
return false;
|
||||
}
|
||||
*ppath = path;
|
||||
*ptr = rawmemchr(pos, '\0');
|
||||
*ptr = strchr(pos, '\0');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user