remove assertions (and put comments for future NS_ASSERTIONs for when I finally change this to a C++ file)

fixes #13734
This commit is contained in:
alecf%netscape.com 1999-09-17 07:35:34 +00:00
parent 82622ebed7
commit 4e56d39a03
2 changed files with 8 additions and 6 deletions

View File

@ -1803,7 +1803,8 @@ PrefResult pref_HashPref(const char *key, PrefValue value, PrefType type, PrefAc
}
else if ((pref->flags & PREF_VALUETYPE_MASK) != (type & PREF_VALUETYPE_MASK))
{
PR_ASSERT(0); /* this shouldn't happen */
//PR_ASSERT(0); /* this shouldn't happen */
// NS_ASSERTION(0, "Trying to set pref to with the wrong type!");
return PREF_TYPE_CHANGE_ERR;
}
@ -2149,8 +2150,8 @@ PrefResult pref_copyTree(const char *srcPrefix, const char *destPrefix, const ch
char *destPrefName = NULL;
char *childStart = (srcPrefixLen > 0) ? (child + srcPrefixLen + 1) : child;
PR_ASSERT( PL_strncmp(child, curSrcBranch, (PRUint32)srcPrefixLen) == 0 );
//NS_ASSERTION( PL_strncmp(child, curSrcBranch, (PRUint32)srcPrefixLen) == 0, "bad pref child in pref_copyTree" );
if (*destPrefix > 0)
destPrefName = PR_smprintf("%s.%s", destPrefix, childStart);
else

View File

@ -1803,7 +1803,8 @@ PrefResult pref_HashPref(const char *key, PrefValue value, PrefType type, PrefAc
}
else if ((pref->flags & PREF_VALUETYPE_MASK) != (type & PREF_VALUETYPE_MASK))
{
PR_ASSERT(0); /* this shouldn't happen */
//PR_ASSERT(0); /* this shouldn't happen */
// NS_ASSERTION(0, "Trying to set pref to with the wrong type!");
return PREF_TYPE_CHANGE_ERR;
}
@ -2149,8 +2150,8 @@ PrefResult pref_copyTree(const char *srcPrefix, const char *destPrefix, const ch
char *destPrefName = NULL;
char *childStart = (srcPrefixLen > 0) ? (child + srcPrefixLen + 1) : child;
PR_ASSERT( PL_strncmp(child, curSrcBranch, (PRUint32)srcPrefixLen) == 0 );
//NS_ASSERTION( PL_strncmp(child, curSrcBranch, (PRUint32)srcPrefixLen) == 0, "bad pref child in pref_copyTree" );
if (*destPrefix > 0)
destPrefName = PR_smprintf("%s.%s", destPrefix, childStart);
else