Bugzilla bug 238563: fixed errors reported by an IBM internal tool.

r=darin. Thanks to Philip K. Warren <pkw@us.ibm.com> for running the
automated tool on NSPR.
Modified Files: prcountr.c prdtoa.c prtrace.c prtpd.c
This commit is contained in:
wchang0222%aol.com 2004-04-12 23:51:47 +00:00
Родитель 81a5467e7e
Коммит ac35782ee0
4 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -284,7 +284,7 @@ PR_IMPLEMENT(PRCounterHandle)
)
{
const char *qn, *rn, *desc;
PRCounterHandle qh, rh;
PRCounterHandle qh, rh = NULL;
RName *rnp = NULL;
PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: GetCounterHandleFromName:\n\t"

Просмотреть файл

@ -577,7 +577,7 @@ static PRInt32 lo0bits(unsigned Long *y)
if (!(x & 1)) {
k++;
x >>= 1;
if (!x & 1)
if (!x)
return 32;
}
*y = x;
@ -2342,6 +2342,7 @@ PR_dtoa(PRFloat64 d, int mode, int ndigits,
/* Check for special case that d is a normalized power of 2. */
spec_case = 0;
if (mode < 2) {
if (!word1(d) && !(word0(d) & Bndry_mask)
#ifndef Sudden_Underflow
@ -2353,8 +2354,6 @@ PR_dtoa(PRFloat64 d, int mode, int ndigits,
s2 += Log2P;
spec_case = 1;
}
else
spec_case = 0;
}
/* Arrange for convenient computation of quotients:

Просмотреть файл

@ -569,7 +569,7 @@ PR_IMPLEMENT(PRTraceHandle)
)
{
const char *qn, *rn, *desc;
PRTraceHandle qh, rh;
PRTraceHandle qh, rh = NULL;
RName *rnp = NULL;
PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: GetTraceHandleFromName:\n\t"

Просмотреть файл

@ -189,10 +189,12 @@ PR_IMPLEMENT(PRStatus) PR_SetThreadPrivate(PRUintn index, void *priv)
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
return PR_FAILURE;
}
(void)memcpy(
extension, self->privateData,
self->tpdLength * sizeof(void*));
PR_DELETE(self->privateData);
if (self->privateData) {
(void)memcpy(
extension, self->privateData,
self->tpdLength * sizeof(void*));
PR_DELETE(self->privateData);
}
self->tpdLength = _pr_tpd_length;
self->privateData = (void**)extension;
}