fix bugs introduced by previous coverity fixes

This commit is contained in:
dmh 2014-04-07 14:01:40 -06:00
parent 389d2ea394
commit fb00c88763
4 changed files with 4 additions and 4 deletions

View File

@ -597,7 +597,7 @@ dumpslices(DCEslice* slice, unsigned int rank)
buf = ncbytesnew();
for(i=0;i<rank;i++,slice++) {
String sslice = dumpslice(slice);
char* sslice = dumpslice(slice);
if(sslice != NULL) {
ncbytescat(buf,sslice);
free(sslice);

View File

@ -600,7 +600,7 @@ ncuridecodeparams(NCURI* ncuri)
/* plist is an env style list */
plist = (char**)calloc(1,sizeof(char*)*(2*nparams+1)); /* +1 for null termination */
if(plist == NULL)
return NC_ENOMEM;
return 0;
/* Break up each param into a (name,value) pair*/
/* and insert into the param list */

View File

@ -147,7 +147,7 @@ void**
oclistdup(OClist* l)
{
void** result = (void**)malloc(sizeof(void*)*(l->length+1));
if(result != NULL && l != NULL && oclistength(l) != 0)
if(result != NULL && l != NULL && oclistlength(l) != 0)
memcpy((void*)result,(void*)l->content,sizeof(void*)*l->length);
result[l->length] = (void*)0;
return result;

View File

@ -599,7 +599,7 @@ ocuridecodeparams(OCURI* ocuri)
/* plist is an env style list */
plist = (char**)calloc(1,sizeof(char*)*(2*nparams+1)); /* +1 for null termination */
if(plist == NULL)
return NC_ENOMEM;
return 0;
/* Break up each param into a (name,value) pair*/
/* and insert into the param list */