mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r5956: more compile warngin fixes from the Mr. Mader
(This used to be commit f3f315b14d
)
This commit is contained in:
parent
d44a737932
commit
73d1950c01
@ -363,16 +363,16 @@ BOOL strisnormal(const char *s, int case_default)
|
|||||||
NOTE: oldc and newc must be 7 bit characters
|
NOTE: oldc and newc must be 7 bit characters
|
||||||
**/
|
**/
|
||||||
|
|
||||||
void string_replace(pstring s,char oldc,char newc)
|
void string_replace( pstring s, char oldc, char newc )
|
||||||
{
|
{
|
||||||
unsigned char *p;
|
char *p;
|
||||||
|
|
||||||
/* this is quite a common operation, so we want it to be
|
/* this is quite a common operation, so we want it to be
|
||||||
fast. We optimise for the ascii case, knowing that all our
|
fast. We optimise for the ascii case, knowing that all our
|
||||||
supported multi-byte character sets are ascii-compatible
|
supported multi-byte character sets are ascii-compatible
|
||||||
(ie. they match for the first 128 chars) */
|
(ie. they match for the first 128 chars) */
|
||||||
|
|
||||||
for (p = (unsigned char *)s; *p; p++) {
|
for (p = s; *p; p++) {
|
||||||
if (*p & 0x80) /* mb string - slow path. */
|
if (*p & 0x80) /* mb string - slow path. */
|
||||||
break;
|
break;
|
||||||
if (*p == oldc)
|
if (*p == oldc)
|
||||||
|
@ -831,7 +831,7 @@ ADS_MODLIST ads_init_mods(TALLOC_CTX *ctx)
|
|||||||
need to reset it to NULL before doing ldap modify */
|
need to reset it to NULL before doing ldap modify */
|
||||||
mods[ADS_MODLIST_ALLOC_SIZE] = (LDAPMod *) -1;
|
mods[ADS_MODLIST_ALLOC_SIZE] = (LDAPMod *) -1;
|
||||||
|
|
||||||
return mods;
|
return (ADS_MODLIST)mods;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -868,7 +868,7 @@ static ADS_STATUS ads_modlist_add(TALLOC_CTX *ctx, ADS_MODLIST *mods,
|
|||||||
memset(&modlist[curmod], 0,
|
memset(&modlist[curmod], 0,
|
||||||
ADS_MODLIST_ALLOC_SIZE*sizeof(LDAPMod *));
|
ADS_MODLIST_ALLOC_SIZE*sizeof(LDAPMod *));
|
||||||
modlist[curmod+ADS_MODLIST_ALLOC_SIZE] = (LDAPMod *) -1;
|
modlist[curmod+ADS_MODLIST_ALLOC_SIZE] = (LDAPMod *) -1;
|
||||||
*mods = modlist;
|
*mods = (ADS_MODLIST)modlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(modlist[curmod] = TALLOC_ZERO_P(ctx, LDAPMod)))
|
if (!(modlist[curmod] = TALLOC_ZERO_P(ctx, LDAPMod)))
|
||||||
@ -1006,7 +1006,7 @@ ADS_STATUS ads_gen_add(ADS_STRUCT *ads, const char *new_dn, ADS_MODLIST mods)
|
|||||||
/* make sure the end of the list is NULL */
|
/* make sure the end of the list is NULL */
|
||||||
mods[i] = NULL;
|
mods[i] = NULL;
|
||||||
|
|
||||||
ret = ldap_add_s(ads->ld, utf8_dn, mods);
|
ret = ldap_add_s(ads->ld, utf8_dn, (LDAPMod**)mods);
|
||||||
SAFE_FREE(utf8_dn);
|
SAFE_FREE(utf8_dn);
|
||||||
return ADS_ERROR(ret);
|
return ADS_ERROR(ret);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user