1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-14 20:23:54 +03:00

Syncing up current oplock work in progress. #ifdef'ed out

so should have no effect on other work.
Jeremy (jallison@whistle.com)
This commit is contained in:
Jeremy Allison
-
parent eb55ddd5bf
commit 7e3d4c8b21
8 changed files with 291 additions and 167 deletions

View File

@@ -4061,53 +4061,52 @@ enum remote_arch_types get_remote_arch()
return ra_type;
}
/*******************************************************************
safe string copy into a fstring
********************************************************************/
void fstrcpy(char *dest, char *src)
{
int maxlength = sizeof(fstring) - 1;
if (!dest) {
DEBUG(0,("ERROR: NULL dest in fstrcpy\n"));
return;
}
int maxlength = sizeof(fstring) - 1;
if (!dest) {
DEBUG(0,("ERROR: NULL dest in fstrcpy\n"));
return;
}
if (!src) {
*dest = 0;
return;
}
while (maxlength-- && *src)
*dest++ = *src++;
*dest = 0;
if (*src) {
DEBUG(0,("ERROR: string overflow by %d in fstrcpy\n",
strlen(src)));
}
}
if (!src) {
*dest = 0;
return;
}
while (maxlength-- && *src)
*dest++ = *src++;
*dest = 0;
if (*src) {
DEBUG(0,("ERROR: string overflow by %d in fstrcpy\n",
strlen(src)));
}
}
/*******************************************************************
safe string copy into a pstring
********************************************************************/
void pstrcpy(char *dest, char *src)
{
int maxlength = sizeof(pstring) - 1;
if (!dest) {
DEBUG(0,("ERROR: NULL dest in pstrcpy\n"));
return;
}
if (!src) {
*dest = 0;
return;
}
while (maxlength-- && *src)
*dest++ = *src++;
*dest = 0;
if (*src) {
DEBUG(0,("ERROR: string overflow by %d in pstrcpy\n",
strlen(src)));
}
}
int maxlength = sizeof(pstring) - 1;
if (!dest) {
DEBUG(0,("ERROR: NULL dest in pstrcpy\n"));
return;
}
if (!src) {
*dest = 0;
return;
}
while (maxlength-- && *src)
*dest++ = *src++;
*dest = 0;
if (*src) {
DEBUG(0,("ERROR: string overflow by %d in pstrcpy\n",
strlen(src)));
}
}