mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dthelp: more coverity fixes
This commit is contained in:
parent
f4e3cb8327
commit
10468068ac
9 changed files with 14 additions and 7 deletions
|
@ -192,6 +192,7 @@ int _DtHPrGenFileOrPrint(
|
|||
if ( (status = system(printCommand))!= 0)
|
||||
{
|
||||
unlink(tmpfile);
|
||||
free(tmpfile);
|
||||
return status; /* RETURN */
|
||||
}
|
||||
|
||||
|
|
|
@ -1610,6 +1610,7 @@ else
|
|||
{
|
||||
strcpy(pCharset, charset);
|
||||
mb_free(&charset);
|
||||
free(charset);
|
||||
}
|
||||
else
|
||||
strcpy(pCharset, isoString);
|
||||
|
@ -2809,7 +2810,7 @@ int tryleng = sizeof(pathbuf);
|
|||
int pathleng;
|
||||
int fileleng;
|
||||
SEARCH *thispath;
|
||||
char *mb_inputname;
|
||||
char *mb_inputname = NULL;
|
||||
M_WCHAR *wc_try, *wc_outputname;
|
||||
int tossfile;
|
||||
char filebuf[BIGBUF];
|
||||
|
@ -2876,6 +2877,8 @@ else
|
|||
}
|
||||
|
||||
if (try != pathbuf) mb_free(&try);
|
||||
|
||||
mb_free(&mb_inputname);
|
||||
}
|
||||
|
||||
/* Below is a modified version of m_cyclent() that returns a pointer
|
||||
|
|
|
@ -155,6 +155,7 @@ strcpy(helpext, ".xrh");
|
|||
tex = fopen(helpbase, "w");
|
||||
fprintf(tex, "\\gobble\001%s\002%%\n", m_signon);
|
||||
fputs("% Generated Cross-Reference Macros (for a particular document)\n", tex);
|
||||
fclose(tex);
|
||||
if (! xtree.data) return;
|
||||
|
||||
n = 0;
|
||||
|
|
|
@ -483,7 +483,7 @@ char *partype(n)
|
|||
void srefout(M_NOPAR)
|
||||
{
|
||||
LOGICAL first = TRUE ;
|
||||
int *mapbysref ;
|
||||
int *mapbysref = NULL;
|
||||
SREFSTRUCT *srefp ;
|
||||
SREFDATA *data ;
|
||||
int count = 0 ;
|
||||
|
@ -544,6 +544,7 @@ void srefout(M_NOPAR)
|
|||
fputs(ndif, dtd) ;
|
||||
}
|
||||
SUBONE
|
||||
free(mapbysref);
|
||||
}
|
||||
|
||||
/* Output one element block in a template */
|
||||
|
|
|
@ -424,8 +424,9 @@ if (loading) newdlm = (char **) calloc(trysize, sizeof(M_WCHAR *));
|
|||
if (! newtransit || (loading && ! newdlm))
|
||||
{
|
||||
trysize = NUMDELIM + 1;
|
||||
free(newtransit);
|
||||
newtransit = (int *) calloc(NUMCON * trysize, sizeof(int));
|
||||
if (loading) newdlm = (char **) calloc(trysize, sizeof(M_WCHAR *));
|
||||
if (loading) { free(newdlm); newdlm = (char **) calloc(trysize, sizeof(M_WCHAR *)); }
|
||||
}
|
||||
if (! newtransit || (loading && ! newdlm))
|
||||
{
|
||||
|
|
|
@ -144,6 +144,7 @@ void copyfile(pfile1,pfile2)
|
|||
ret = system(pcmd);
|
||||
ret = snprintf(pcmd, slen, "touch %s",pfile2);
|
||||
ret = system(pcmd);
|
||||
free(pcmd);
|
||||
}
|
||||
|
||||
int nextchar(file, data)
|
||||
|
|
|
@ -75,7 +75,7 @@ int main(argc, argv)
|
|||
fprintf(stderr, "**** Specify interface file ****\n") ;
|
||||
exit(TRUE) ;
|
||||
}
|
||||
strncpy(iffile, argv[1], IFLEN) ;
|
||||
strncpy(iffile, argv[1], IFLEN - 1) ;
|
||||
initialize() ;
|
||||
while (TRUE) {
|
||||
m_token = scan() ;
|
||||
|
|
|
@ -6395,7 +6395,7 @@ while (incr)
|
|||
* the amount of padding needed in between the vstruct and the first
|
||||
* virpage to make everything work
|
||||
*/
|
||||
static int CompressVstruct()
|
||||
static void CompressVstruct()
|
||||
{
|
||||
#define COMPRESS_PAD_LENGTH 10
|
||||
char buffer[BUFSIZ], zTemp[4];
|
||||
|
|
|
@ -72,8 +72,7 @@ void entout(fname)
|
|||
int nameindex ;
|
||||
LOGICAL start ;
|
||||
|
||||
strncpy(efilename, fname, ENTFILENAME) ;
|
||||
strncpy(&efilename[strlen(efilename)], ".h", 2) ;
|
||||
snprintf(efilename, sizeof(efilename), "%s.h", fname);
|
||||
m_openchk(&entfile, efilename, "w") ;
|
||||
|
||||
fprintf(entfile, "#include \"entdef.h\"\n") ;
|
||||
|
|
Loading…
Reference in a new issue