Corrected a handful of coverity issues.

This commit is contained in:
Ward Fisher 2012-12-13 21:43:13 +00:00
parent 3d7a2f8f52
commit 535b1e47aa
3 changed files with 7 additions and 2 deletions

View File

@ -347,7 +347,11 @@ ncuriparse(const char* uri0, NCURI** durip)
fprintf(stderr,"\n");
}
#endif
if(durip != NULL) *durip = duri;
if(durip != NULL)
*durip = duri;
else
ncurifree(duri);
return 1;
fail:

View File

@ -1003,6 +1003,7 @@ makeconstdata(nc_type nctype)
consttype = nctype;
con.nctype = nctype;
con.lineno = lineno;
con.filled = 0;
switch (nctype) {
case NC_CHAR: con.value.charv = char_val; break;
case NC_BYTE: con.value.int8v = byte_val; break;

View File

@ -67,7 +67,7 @@ gen_load_c(
double *doublevalp;
char stmnt[C_MAX_STMNT];
size_t stmnt_len;
char s2[C_MAX_STMNT];
char s2[C_MAX_STMNT] = {'\0'};
if (!vars[varnum].has_data)
return;